summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-24 06:45:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-24 06:45:50 +0000
commit2ef0c6a1098cf9a237e49eff2542eeea8d0f8440 (patch)
tree86b1f80309a62d1dedb7ab8c839307b886c9ec9a /eval.c
parent83b531e3eaeb4ab435c94634ad50b51600c35e53 (diff)
* document updates - [ruby-core:04296], [ruby-core:04301],
[ruby-core:04302], [ruby-core:04307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/eval.c b/eval.c
index 3f0dec822a..8351a6b28a 100644
--- a/eval.c
+++ b/eval.c
@@ -8264,15 +8264,14 @@ static VALUE method_arity _((VALUE));
* call-seq:
* prc.arity -> fixnum
*
- * Returns the number of arguments required by the block. If the block
+ * Returns the number of arguments that would not be ignored. If the block
* is declared to take no arguments, returns 0. If the block is known
* to take exactly n arguments, returns n. If the block has optional
* arguments, return -n-1, where n is the number of mandatory
- * arguments. A <code>proc</code> with no argument declarations
- * returns -1, as it can accept (and ignore) an arbitrary number of
- * parameters.
+ * arguments. A <code>proc</code> with no argument declarations
+ * is the same a block declaring <code>||</code> as its arguments.
*
- * Proc.new {}.arity #=> -1
+ * Proc.new {}.arity #=> 0
* Proc.new {||}.arity #=> 0
* Proc.new {|a|}.arity #=> 1
* Proc.new {|a,b|}.arity #=> 2