diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 21:11:33 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 21:11:33 +0000 |
commit | 3044a0bcd90b2176ed471a6fb970ad37d5f162cd (patch) | |
tree | 36fe87644351013342d6c556ed6ed08b0a5fe53b /proc.c | |
parent | 7803106c1bdaf8c067d29fced64bee0e3e15a435 (diff) |
proc.c: fix RDoc of Proc#===/call/yield/[]
[Bug #12332]
Since r52050 ("proc.c: enable optimization of Proc#call")
for [Feature #11569], we need to maintain this documentation
in a way RDoc comprehends. This is probably not worth fixing
in RDoc itself since this uses a non-standard internal C API
which is subject to change without notice.
ref:
http://mid.gmane.org/[email protected]
http://mid.gmane.org/[email protected]
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/435458
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -733,6 +733,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 @@ -2919,6 +2923,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); |