[ruby-cvs:51129] nobu:r43984 (trunk): delegate.rb: ignore unset target

nobu at ruby-lang.org nobu at ruby-lang.org
Wed Dec 4 12:47:58 JST 2013


nobu	2013-12-04 12:47:57 +0900 (Wed, 04 Dec 2013)

  New Revision: 43984

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43984

  Log:
    delegate.rb: ignore unset target
    
    * lib/delegate.rb (Delegator#method_missing): ignore the target if not
      set, and delegate to global methods.  [ruby-core:58572] [Bug #9155]
    * lib/delegate.rb (Delegator#respond_to_missing): ditto.
    * lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if
      not delegated but a block is given, like as Hash#fetch.
    * lib/delegate.rb (DelegateClass#__getobj__): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/delegate.rb
    trunk/test/test_delegate.rb


More information about the ruby-cvs mailing list