merge revision(s) 44630,44631: [Backport #9403]

* lib/delegate.rb (Delegator): keep source information methods
	  which start and end with '__'.  [ruby-core:58572] [Bug #9155]
	  which start and end with '__'.  [ruby-core:59718] [Bug #9403]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2014-02-02 13:46:46 +00:00
parent 484a6ffb78
commit 3da0a0cead
4 changed files with 66 additions and 4 deletions

View file

@ -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