mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
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:
parent
484a6ffb78
commit
3da0a0cead
4 changed files with 66 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue