diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/delegate.rb | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sat Jun 9 07:46:26 2012 Eric Hodel <[email protected]> + + * lib/delegate.rb: Added documentation for Delegator#!. Patch by + Zachary Scott. [ruby-trunk - Feature #6534] + Sat Jun 9 07:39:50 2012 Eric Hodel <[email protected]> * lib/net/http/responses.rb: Add RFC 6585 response codes. Patch by diff --git a/lib/delegate.rb b/lib/delegate.rb index 863c63ff58..e46e4f8c23 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -130,6 +130,9 @@ class Delegator < BasicObject __getobj__ != obj end + # + # Delegates ! to the \_\_getobj\_\_ + # def ! !__getobj__ end @@ -285,8 +288,7 @@ class SimpleDelegator<Delegator end end -# :stopdoc: -def Delegator.delegating_block(mid) +def Delegator.delegating_block(mid) # :nodoc: lambda do |*args, &block| target = self.__getobj__ begin @@ -296,7 +298,6 @@ def Delegator.delegating_block(mid) end end end -# :startdoc: # # The primary interface to this library. Use to setup delegation when defining |