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

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
This commit is contained in:
normal 2016-05-15 21:11:33 +00:00
parent 7803106c1b
commit 3044a0bcd9
2 changed files with 16 additions and 0 deletions

View file

@ -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]

11
proc.c
View file

@ -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);