proc.c: remove unnecessary static function
* proc.c (proc_lambda): remove and use rb_block_lambda directly instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
df9991fe2b
commit
71a6870513
24
proc.c
24
proc.c
@ -481,6 +481,14 @@ rb_block_proc(void)
|
|||||||
return proc_new(rb_cProc, FALSE);
|
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
|
VALUE
|
||||||
rb_block_lambda(void)
|
rb_block_lambda(void)
|
||||||
{
|
{
|
||||||
@ -494,20 +502,6 @@ rb_f_lambda(void)
|
|||||||
return rb_block_lambda();
|
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: ===
|
/* Document-method: ===
|
||||||
*
|
*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
@ -2353,7 +2347,7 @@ Init_Proc(void)
|
|||||||
|
|
||||||
/* utility functions */
|
/* utility functions */
|
||||||
rb_define_global_function("proc", rb_block_proc, 0);
|
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 */
|
/* Method */
|
||||||
rb_cMethod = rb_define_class("Method", rb_cObject);
|
rb_cMethod = rb_define_class("Method", rb_cObject);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user