diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-24 06:45:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-24 06:45:50 +0000 |
commit | 3df59b04c2563b0a822033ed1b96d46cae98f824 (patch) | |
tree | 86b1f80309a62d1dedb7ab8c839307b886c9ec9a /eval.c | |
parent | a2efd9a96d397d8195b5a1529b72ed684a152938 (diff) | |
download | ruby-3df59b04c2563b0a822033ed1b96d46cae98f824.tar.gz ruby-3df59b04c2563b0a822033ed1b96d46cae98f824.tar.xz ruby-3df59b04c2563b0a822033ed1b96d46cae98f824.zip |
* document updates - [ruby-core:04296], [ruby-core:04301],
[ruby-core:04302], [ruby-core:04307]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |