Method: Kernel#lambda

Defined in:
proc.c

#lambda {|...| ... } ⇒ Proc

Equivalent to Proc.new, except the resulting Proc objects check the number of parameters passed when called.

Yields:

  • (...)

Returns:



901
902
903
904
905
906
# File 'proc.c', line 901

static VALUE
f_lambda(VALUE _)
{
    f_lambda_filter_non_literal();
    return rb_block_lambda();
}