Project

General

Profile

« Previous | Next » 

Revision fc4de123

Added by nobu (Nobuyoshi Nakada) over 10 years ago

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e