[前][次][番号順一覧][スレッド一覧]

ruby-changes:21341

From: drbrain <ko1@a...>
Date: Tue, 4 Oct 2011 08:01:18 +0900 (JST)
Subject: [ruby-changes:21341] drbrain:r33390 (trunk): * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.

drbrain	2011-10-04 07:59:45 +0900 (Tue, 04 Oct 2011)

  New Revision: 33390

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33390

  Log:
    * proc.c (proc_call):  Fix documentation of Proc#call vs Proc#===.
      [Ruby 1.9 - Bug #5349]

  Modified files:
    trunk/ChangeLog
    trunk/proc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33389)
+++ ChangeLog	(revision 33390)
@@ -1,3 +1,8 @@
+Tue Oct  4 07:59:16 2011  Eric Hodel  <drbrain@s...>
+
+	* 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@s...>
 
 	* array.c (rb_ary_initalize):  Make Array.new description match
Index: proc.c
===================================================================
--- proc.c	(revision 33389)
+++ proc.c	(revision 33390)
@@ -494,6 +494,16 @@
     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 @@
  *  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 @@
  *     	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)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]