mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c: Tweak rdoc for consistent whitespace
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9047641ce3
commit
04042ec6eb
1 changed files with 14 additions and 14 deletions
28
proc.c
28
proc.c
|
@ -846,24 +846,24 @@ rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE pass_proc
|
|||
* arguments. A <code>proc</code> with no argument declarations
|
||||
* is the same a block declaring <code>||</code> as its arguments.
|
||||
*
|
||||
* proc {}.arity #=> 0
|
||||
* proc {||}.arity #=> 0
|
||||
* proc {|a|}.arity #=> 1
|
||||
* proc {|a,b|}.arity #=> 2
|
||||
* proc {|a,b,c|}.arity #=> 3
|
||||
* proc {|*a|}.arity #=> -1
|
||||
* proc {|a,*b|}.arity #=> -2
|
||||
* proc {|a,*b, c|}.arity #=> -3
|
||||
* proc {}.arity #=> 0
|
||||
* proc { || }.arity #=> 0
|
||||
* proc { |a| }.arity #=> 1
|
||||
* proc { |a, b| }.arity #=> 2
|
||||
* proc { |a, b, c| }.arity #=> 3
|
||||
* proc { |*a| }.arity #=> -1
|
||||
* proc { |a, *b| }.arity #=> -2
|
||||
* proc { |a, *b, c| }.arity #=> -3
|
||||
*
|
||||
* proc { |x = 0| }.arity #=> 0
|
||||
* lambda { |a = 0| }.arity #=> -1
|
||||
* proc { |x=0, y| }.arity #=> 1
|
||||
* proc { |x=0| }.arity #=> 0
|
||||
* lambda { |x=0| }.arity #=> -1
|
||||
* proc { |x=0, y| }.arity #=> 1
|
||||
* lambda { |x=0, y| }.arity #=> -2
|
||||
* proc { |x=0, y=0| }.arity #=> 0
|
||||
* proc { |x=0, y=0| }.arity #=> 0
|
||||
* lambda { |x=0, y=0| }.arity #=> -1
|
||||
* proc { |x, y=0| }.arity #=> 1
|
||||
* proc { |x, y=0| }.arity #=> 1
|
||||
* lambda { |x, y=0| }.arity #=> -2
|
||||
* proc { |(x, y), z=0| }.arity #=> 1
|
||||
* proc { |(x, y), z=0| }.arity #=> 1
|
||||
* lambda { |(x, y), z=0| }.arity #=> -2
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue