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

ruby-changes:40193

From: nobu <ko1@a...>
Date: Sun, 25 Oct 2015 09:39:53 +0900 (JST)
Subject: [ruby-changes:40193] nobu:r52274 (trunk): update document [ci skip]

nobu	2015-10-25 09:39:29 +0900 (Sun, 25 Oct 2015)

  New Revision: 52274

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

  Log:
    update document [ci skip]
    
    * error.c (ArgumentError): [DOC] update document following
      [Feature #9025]
    
    * proc.c (proc_call, proc_curry): [DOC] ditto.

  Modified files:
    trunk/error.c
    trunk/proc.c
Index: proc.c
===================================================================
--- proc.c	(revision 52273)
+++ proc.c	(revision 52274)
@@ -749,7 +749,7 @@ rb_block_clear_env_self(VALUE proc) https://github.com/ruby/ruby/blob/trunk/proc.c#L749
  *
  *  <em>produces:</em>
  *
- *     prog.rb:4:in `block in <main>': wrong number of arguments (3 for 2) (ArgumentError)
+ *     prog.rb:4:in `block in <main>': wrong number of arguments (given 3, expected 2) (ArgumentError)
  *     	from prog.rb:5:in `call'
  *     	from prog.rb:5:in `<main>'
  *
@@ -2713,16 +2713,16 @@ curry(VALUE dummy, VALUE args, int argc, https://github.com/ruby/ruby/blob/trunk/proc.c#L2713
   *
   *     b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) }
   *     p b.curry[1][2][3]           #=> 6
-  *     p b.curry[1, 2][3, 4]        #=> wrong number of arguments (4 for 3)
-  *     p b.curry(5)                 #=> wrong number of arguments (5 for 3)
-  *     p b.curry(1)                 #=> wrong number of arguments (1 for 3)
+  *     p b.curry[1, 2][3, 4]        #=> wrong number of arguments (given 4, expected 3)
+  *     p b.curry(5)                 #=> wrong number of arguments (given 5, expected 3)
+  *     p b.curry(1)                 #=> wrong number of arguments (given 1, expected 3)
   *
   *     b = lambda {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.inject(0, &:+) }
   *     p b.curry[1][2][3]           #=> 6
   *     p b.curry[1, 2][3, 4]        #=> 10
   *     p b.curry(5)[1][2][3][4][5]  #=> 15
   *     p b.curry(5)[1, 2][3, 4][5]  #=> 15
-  *     p b.curry(1)                 #=> wrong number of arguments (1 for 3)
+  *     p b.curry(1)                 #=> wrong number of arguments (given 1, expected 3)
   *
   *     b = proc { :foo }
   *     p b.curry[]                  #=> :foo
Index: error.c
===================================================================
--- error.c	(revision 52273)
+++ error.c	(revision 52274)
@@ -1592,7 +1592,7 @@ syserr_eqq(VALUE self, VALUE exc) https://github.com/ruby/ruby/blob/trunk/error.c#L1592
  *
  *  <em>raises the exception:</em>
  *
- *     ArgumentError: wrong number of arguments (2 for 1)
+ *     ArgumentError: wrong number of arguments (given 2, expected 1)
  *
  *  Ex: passing an argument that is not acceptable:
  *

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

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