diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-13 18:48:35 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-13 18:48:35 +0000 |
commit | 1ce12771c094e49283ffe9dbc9c083f8b5450c8d (patch) | |
tree | 9e95d10170d166b36f0a66dd6e553c2ef1e5d263 /proc.c | |
parent | f8cccade22dfe6380bdc0d5e9543c585941612f2 (diff) |
merge revision(s) 55010: [Backport #12332]
* proc.c: fix RDoc of Proc#===/call/yield/[]
[Bug #12332]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -727,6 +727,10 @@ rb_block_lambda(void) /* CHECKME: are the argument checking semantics correct? */ /* + * Document-method: call + * Document-method: [] + * Document-method: yield + * * call-seq: * prc.call(params,...) -> obj * prc[params,...] -> obj @@ -2898,6 +2902,13 @@ Init_Proc(void) rb_add_method(rb_cProc, rb_intern("yield"), VM_METHOD_TYPE_OPTIMIZED, (void *)OPTIMIZED_METHOD_TYPE_CALL, METHOD_VISI_PUBLIC); +#if 0 /* for RDoc */ + rb_define_method(rb_cProc, "call", proc_call, -1); + rb_define_method(rb_cProc, "[]", proc_call, -1); + rb_define_method(rb_cProc, "===", proc_call, -1); + rb_define_method(rb_cProc, "yield", proc_call, -1); +#endif + rb_define_method(rb_cProc, "to_proc", proc_to_proc, 0); rb_define_method(rb_cProc, "arity", proc_arity, 0); rb_define_method(rb_cProc, "clone", proc_clone, 0); |