0001-Add-back-documentation-for-Proc-call-etc.patch

Alexander Kahn, 09/22/2011 05:20 AM

Download (1.67 KB)

View differences:

proc.c
501 501
 *     prc.call(params,...)   -> obj
502 502
 *     prc[params,...]        -> obj
503 503
 *     prc.(params,...)       -> obj
504
 *     prc === param          -> obj
504 505
 *
505 506
 *  Invokes the block, setting the block's parameters to the values in
506 507
 *  <i>params</i> using something close to method calling semantics.
507 508
 *  Generates a warning if multiple values are passed to a proc that
508 509
 *  expects just one (previously this silently converted the parameters
509
 *  to an array).  Note that prc.() invokes prc.call() with the parameters
510
 *  given.  It's a syntax sugar to hide "call".
510
 *  to an array). Note that prc.() invokes prc.call() with the parameters
511
 *  given. It's syntax sugar to hide "call". prc === param allows a proc
512
 *  object to be the target of a +when+ clause in the case statement.
511 513
 *
512 514
 *  For procs created using <code>Kernel.proc</code>, generates an
513 515
 *  error if the wrong number of parameters
......
530 532
 *     	from prog.rb:5
531 533
 */
532 534

  
533
/*
534
 *  call-seq:
535
 *     prc === obj   -> result_of_proc
536
 *
537
 *  Invokes the block, with <i>obj</i> as the block's parameter.  It is
538
 *  to allow a proc object to be a target of +when+ clause in the case statement.
539
 */
540

  
541 535
static VALUE
542 536
proc_call(int argc, VALUE *argv, VALUE procval)
543 537
{
544
-