summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--proc.c26
2 files changed, 19 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 89ec463119..644beb193e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 4 07:59:16 2011 Eric Hodel <drbrain@segment7.net>
+
+ * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.
+ [Ruby 1.9 - Bug #5349]
+
Tue Oct 4 07:43:18 2011 Eric Hodel <drbrain@segment7.net>
* array.c (rb_ary_initalize): Make Array.new description match
diff --git a/proc.c b/proc.c
index 8a19a88a2c..e58bc0817b 100644
--- a/proc.c
+++ b/proc.c
@@ -494,6 +494,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? */
/*
@@ -509,10 +519,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>.
@@ -530,14 +540,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)
{