1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/forwardable.rb: support 'delegate :foo => :bar' for to meet

by specification of RDOC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
keiju 2011-05-11 11:12:40 +00:00
parent 1111afbe5a
commit fcd7300bf2
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Wed May 11 19:45:27 2011 Keiju Ishitsuka <keiju@ishitsuka.com>
* lib/forwardable.rb: support 'delegate :foo => :bar' for to meet
by specification of RDOC.
Wed May 11 08:36:38 2011 Eric Hodel <drbrain@segment7.net>
* lib/webrick: Add documentation for WEBrick::HTTPAuth

View file

@ -149,7 +149,7 @@ module Forwardable
#
def instance_delegate(hash)
hash.each{ |methods, accessor|
methods = methods.to_s unless methods.respond_to?(:each)
methods = [methods] unless methods.respond_to?(:each)
methods.each{ |method|
def_instance_delegator(accessor, method)
}
@ -214,7 +214,7 @@ module SingleForwardable
#
def single_delegate(hash)
hash.each{ |methods, accessor|
methods = methods.to_s unless methods.respond_to?(:each)
methods = [methods] unless methods.respond_to?(:each)
methods.each{ |method|
def_single_delegator(accessor, method)
}