summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
diff options
context:
space:
mode:
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 1ba4cf1e1b9..6ceaa67d29f 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