proc { |...| block } → a_proc lambda { |...| block } → a_proc
Equivalent to Proc.new, except the resulting Proc objects check the number of parameters passed when called.
Source Code
/* * call-seq: * proc { |...| block } => a_proc * 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() { return proc_alloc(rb_cProc, Qtrue); }
<code/>and<pre/>for code samples.