ruby-changes:42937
From: normal <ko1@a...>
Date: Mon, 16 May 2016 06:11:39 +0900 (JST)
Subject: [ruby-changes:42937] normal:r55010 (trunk): proc.c: fix RDoc of Proc#===/call/yield/[]
normal 2016-05-16 06:11:33 +0900 (Mon, 16 May 2016) New Revision: 55010 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55010 Log: 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@d... http://mid.gmane.org/1461959651.806728.670.51764@m... http://blade.nagaokaut.ac.jp/ruby/ruby-talk/435458 Modified files: trunk/ChangeLog trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 55009) +++ proc.c (revision 55010) @@ -733,6 +733,10 @@ rb_block_lambda(void) https://github.com/ruby/ruby/blob/trunk/proc.c#L733 /* 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) https://github.com/ruby/ruby/blob/trunk/proc.c#L2923 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); Index: ChangeLog =================================================================== --- ChangeLog (revision 55009) +++ ChangeLog (revision 55010) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon May 16 06:06:21 2016 Eric Wong <e@8...> + + * proc.c: fix RDoc of Proc#===/call/yield/[] + [Bug #12332] + Sun May 15 20:55:31 2016 Masatoshi SEKI <m_seki@m...> * lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/