mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/delegate.rb (Delegator::MethodDelegation#respond_to):
respond_to? should now take optional second argument; submitted by Jeremy Kemper <jeremy at bitsweat.net> in [ruby-core:17045]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5b7464b047
commit
c147806901
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Jun 2 16:26:17 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/delegate.rb (Delegator::MethodDelegation#respond_to):
|
||||
respond_to? should now take optional second argument; submitted
|
||||
by Jeremy Kemper <jeremy at bitsweat.net> in [ruby-core:17045].
|
||||
|
||||
Mon Jun 2 16:14:18 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Oops. This
|
||||
|
|
|
@ -152,9 +152,9 @@ class Delegator
|
|||
# Checks for a method provided by this the delegate object by fowarding the
|
||||
# call through \_\_getobj\_\_.
|
||||
#
|
||||
def respond_to?(m)
|
||||
def respond_to?(m, include_private = false)
|
||||
return true if super
|
||||
return self.__getobj__.respond_to?(m)
|
||||
return self.__getobj__.respond_to?(m, include_private)
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue