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

[DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2020-04-24 11:10:44 +09:00
parent ac2106acc2
commit cf90df22c7
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

14
proc.c
View file

@ -2271,10 +2271,22 @@ method_clone(VALUE self)
*/
/* Document-method: Method#[]
*
* call-seq:
* meth[args, ...] -> obj
*
* Invokes the <i>meth</i> with the specified arguments, returning the
* method's return value, like #call.
*
* m = 12.method("+")
* m[3] #=> 15
* m[20] #=> 32
*/
/*
* call-seq:
* meth.call(args, ...) -> obj
* meth[args, ...] -> obj
*
* Invokes the <i>meth</i> with the specified arguments, returning the
* method's return value.