зеркало из https://github.com/github/ruby.git
* lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
Patch by Vladimir Andrijevik [Github Fixes #230] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6856d86dc1
Коммит
5a7c4d2a78
|
@ -1,3 +1,8 @@
|
|||
Fri Jan 4 11:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
|
||||
Patch by Vladimir Andrijevik [Github Fixes #230]
|
||||
|
||||
Fri Jan 4 00:35:11 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
|
||||
|
||||
Fix failures on btest for NativeClient.
|
||||
|
|
|
@ -250,11 +250,12 @@ module SingleForwardable
|
|||
end
|
||||
end
|
||||
|
||||
# :call-seq:
|
||||
# def_single_delegator(accessor, method, new_name=method)
|
||||
#
|
||||
# Defines a method _method_ which delegates to _obj_ (i.e. it calls
|
||||
# the method of the same name in _obj_). If _new_name_ is
|
||||
# Defines a method _method_ which delegates to _accessor_ (i.e. it calls
|
||||
# the method of the same name in _accessor_). If _new_name_ is
|
||||
# provided, it is used as the name for the delegate method.
|
||||
#
|
||||
def def_single_delegator(accessor, method, ali = method)
|
||||
str = %{
|
||||
def #{ali}(*args, &block)
|
||||
|
|
Загрузка…
Ссылка в новой задаче