summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-15 21:11:33 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-15 21:11:33 +0000
commit3044a0bcd90b2176ed471a6fb970ad37d5f162cd (patch)
tree36fe87644351013342d6c556ed6ed08b0a5fe53b /proc.c
parent7803106c1bdaf8c067d29fced64bee0e3e15a435 (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/20160429212836.GA16605@dcvr.yhbt.net http://mid.gmane.org/1461959651.806728.670.51764@mail.rambler.ru 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index ca0158bc58..850de22634 100644
--- a/proc.c
+++ b/proc.c
@@ -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);