summaryrefslogtreecommitdiff
path: root/test/test_delegate.rb
AgeCommit message (Collapse)Author
2014-01-17delegate.rb: keep special methodsnobu
* lib/delegate.rb (Delegator): keep source information methods which start and end with '__'. [ruby-core:58572] [Bug #9155] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04delegate.rb: ignore unset targetnobu
* 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
2013-11-21delegate.rb: check if target is setnobu
* lib/delegate.rb (SimpleDelegator#__getobj__): target object must be set. * lib/delegate.rb (DelegateClass#__getobj__): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-19delegate.rb: refix r43682nobu
* lib/delegate.rb (Delegator#send): separate from method_missing so that super calls proper method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-15delegate.rb: get rid of global function interferencenobu
* lib/delegate.rb (Delegator#send): override to get rid of global function interference. [Fixes GH-449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-04* lib/delegate.rb (Delegator#methods): Kernel#methods receivesnaruse
zero or one argument. [ruby-core:37118] [Bug #4882] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-08* object.c (rb_obj_clone): call initialize_clone hook method tomatz
call initialize_copy. * object.c (rb_obj_dup): call initialize_dup hook. * lib/delegate.rb (Delegator#initialize_clone): use new hook to implement deep copy. [ruby-dev:40242] * lib/delegate.rb (Delegator#initialize_dup): ditto. * test/test_delegate.rb (TestDelegateClass#test_copy_frozen): add a test to ensure #clone copies frozen status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-06* test/test_delegate.rb (TestDelegateClass::IV#initialize): shouldnobu
set delegation target. * test/test_delegate.rb (TestDelegateClass#test_copy_frozen): clone of frozen delegator also should be frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-05* lib/delegate.rb (Delegator): include copy of Kernel.nobu
[ruby-dev:40314] * lib/delegate.rb (Delegator#{dup,clone}): class of copy should be Delegator. [ruby-dev:40313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03* lib/delegate.rb (Delegator): now inherits BasicObject.nobu
[ruby-dev:39154], [Bug #2679], [ruby-dev:40242] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-07* marshal.c (w_object): reverted r26007. [ruby-dev:39845]nobu
* test/test_delegate.rb (test_marshal): moved from test_marshal.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-06* lib/delegate.rb (Delegator::public_api): take snapshot ofmatz
public method at the beginning time. * lib/delegate.rb (SimpleDelegator#initialize): use Delegator.public_api since public_method might be added after initialization. [ruby-dev:39383] * lib/delegate.rb (DelegateClass): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18add test for {SimpleDelegator, DelegateClass}#class .xibbar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24add a test for [ruby-dev:34808].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16 * test/test_delegate.rb: add new test file for delegate.rb.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e