ruby-changes:28473
From: nobu <ko1@a...>
Date: Tue, 30 Apr 2013 12:30:32 +0900 (JST)
Subject: [ruby-changes:28473] nobu:r40525 (trunk): proc.c: remove unnecessary static function
nobu 2013-04-30 12:30:21 +0900 (Tue, 30 Apr 2013) New Revision: 40525 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40525 Log: proc.c: remove unnecessary static function * proc.c (proc_lambda): remove and use rb_block_lambda directly instead. Modified files: trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 40524) +++ proc.c (revision 40525) @@ -481,6 +481,14 @@ rb_block_proc(void) https://github.com/ruby/ruby/blob/trunk/proc.c#L481 return proc_new(rb_cProc, FALSE); } +/* + * call-seq: + * lambda { |...| block } -> a_proc + * + * Equivalent to <code>Proc.new</code>, except the resulting Proc objects + * check the number of parameters passed when called. + */ + VALUE rb_block_lambda(void) { @@ -494,20 +502,6 @@ rb_f_lambda(void) https://github.com/ruby/ruby/blob/trunk/proc.c#L502 return rb_block_lambda(); } -/* - * call-seq: - * lambda { |...| block } -> a_proc - * - * Equivalent to <code>Proc.new</code>, except the resulting Proc objects - * check the number of parameters passed when called. - */ - -static VALUE -proc_lambda(void) -{ - return rb_block_lambda(); -} - /* Document-method: === * * call-seq: @@ -2353,7 +2347,7 @@ Init_Proc(void) https://github.com/ruby/ruby/blob/trunk/proc.c#L2347 /* utility functions */ rb_define_global_function("proc", rb_block_proc, 0); - rb_define_global_function("lambda", proc_lambda, 0); + rb_define_global_function("lambda", rb_block_lambda, 0); /* Method */ rb_cMethod = rb_define_class("Method", rb_cObject); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/