mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 9 additions and 15 deletions
24
proc.c
24
proc.c
|
@ -481,6 +481,14 @@ rb_block_proc(void)
|
|||
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)
|
|||
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)
|
|||
|
||||
/* 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue