summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-27 06:05:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-27 06:05:04 +0000
commit51e6d9061dc8090bd1c9e3a1a8dadbbd9294a48d (patch)
tree034956384b778251a1dd4090d2f19a43a0d0025b /lib/delegate.rb
parent8df4564367f895a5ba6f9186f7c90ebd07c874bb (diff)
downloadruby-51e6d9061dc8090bd1c9e3a1a8dadbbd9294a48d.tar.gz
* misc/ruby-mode.el: better support for general delimited
strings. [ruby-dev:22695] * lib/weakref.rb (WeakRef::initialize): set up @__id before calling "super". * lib/delegate.rb (Delegator::initialize): preserve singleton_method_added method [ruby-dev:22685] * lib/delegate.rb (Delegator::initialize): use Kernel::raise instead of mere raise. [ruby-dev:22681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r--lib/delegate.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 1ba4cf1e1b..6ceaa67d29 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -27,6 +27,7 @@ class Delegator
preserved |= t.protected_instance_methods(false)
break if t == Delegator
end
+ preserved << "singleton_method_added"
for method in obj.methods
next if preserved.include? method
begin
@@ -37,7 +38,7 @@ class Delegator
rescue Exception
$@.delete_if{|s| /:in `__getobj__'$/ =~ s} #`
$@.delete_if{|s| /^\\(eval\\):/ =~ s}
- raise
+ ::Kernel::raise
end
end
EOS