summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--proc.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d454f91e866..a425abf795d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 16 06:06:21 2016 Eric Wong <e@80x24.org>
+
+ * proc.c: fix RDoc of Proc#===/call/yield/[]
+ [Bug #12332]
+
Sun May 15 20:55:31 2016 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342]
diff --git a/proc.c b/proc.c
index ca0158bc582..850de22634e 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);