summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-17 11:05:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-17 11:05:03 +0000
commitbcaec55695c0592b911d361750834ef0c1a7842f (patch)
tree7beaf2416731148c72e6e6578938eafb9514aca9 /lib
parent191b373d26a48058bcc8955bf3afe426f60eaaea (diff)
delegate.rb: keep special methods
* lib/delegate.rb (Delegator): keep source information methods which start and end with '__'. [ruby-core:58572] [Bug #9155] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/delegate.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index c33f7e40df..d7902292f0 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -48,7 +48,7 @@ class Delegator < BasicObject
undef_method m
end
private_instance_methods.each do |m|
- if /\Ablock_given\?\z|iterator\?\z|\A__raise__\z/ =~ m
+ if /\Ablock_given\?\z|iterator\?\z|\A__.*__\z/ =~ m
next
end
undef_method m