summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-08 09:42:41 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-08 09:42:41 +0000
commite1960cdba2d4c7f4105697402671ab252ee6a3e4 (patch)
treed549a8ca70ecaac9c031ff31dbb6ade18329539a /proc.c
parent4bd17e7c97931130836b7e13796043bfca597ce3 (diff)
merge revision(s) 33390:
* proc.c (proc_call): Fix documentation of Proc#call vs Proc#===. [Ruby 1.9 - Bug #5349] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/proc.c b/proc.c
index 47c8614480..ef383b5492 100644
--- a/proc.c
+++ b/proc.c
@@ -493,6 +493,16 @@ proc_lambda(void)
return rb_block_lambda();
}
+/* Document-method: ===
+ *
+ * call-seq:
+ * proc === obj -> result_of_proc
+ *
+ * Invokes the block with +obj+ as the proc's parameter like Proc#call. It
+ * is to allow a proc object to be a target of +when+ clause in a case
+ * statement.
+ */
+
/* CHECKME: are the argument checking semantics correct? */
/*
@@ -508,10 +518,10 @@ proc_lambda(void)
* to an array). Note that prc.() invokes prc.call() with the parameters
* given. It's a syntax sugar to hide "call".
*
- * For procs created using <code>Kernel.proc</code>, generates an
- * error if the wrong number of parameters
- * are passed to a proc with multiple parameters. For procs created using
- * <code>Proc.new</code>, extra parameters are silently discarded.
+ * For procs created using <code>Kernel.proc</code> an error is generated
+ * if the wrong number of parameters are passed to a proc with multiple
+ * parameters. For procs created using <code>Proc.new</code>, extra
+ * parameters are silently discarded.
*
* Returns the value of the last expression evaluated in the block. See
* also <code>Proc#yield</code>.
@@ -529,14 +539,6 @@ proc_lambda(void)
* from prog.rb:5
*/
-/*
- * call-seq:
- * prc === obj -> result_of_proc
- *
- * Invokes the block, with <i>obj</i> as the block's parameter. It is
- * to allow a proc object to be a target of +when+ clause in the case statement.
- */
-
static VALUE
proc_call(int argc, VALUE *argv, VALUE procval)
{