Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
Proc
/
//opt/alt/ruby21/share/ri/2.1.0/system/Proc/arity-i.ri
U:RDoc::AnyMethod[iI" arity:ETI"Proc#arity;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"MReturns the number of arguments that would not be ignored. If the block ;TI"His declared to take no arguments, returns 0. If the block is known ;TI"Gto take exactly n arguments, returns n. If the block has optional ;TI"@arguments, return -n-1, where n is the number of mandatory ;TI"Barguments. A <code>proc</code> with no argument declarations ;TI"Dis the same a block declaring <code>||</code> as its arguments.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"#proc {}.arity #=> 0 ;TI"#proc {||}.arity #=> 0 ;TI"#proc {|a|}.arity #=> 1 ;TI"#proc {|a,b|}.arity #=> 2 ;TI"#proc {|a,b,c|}.arity #=> 3 ;TI"#proc {|*a|}.arity #=> -1 ;TI"#proc {|a,*b|}.arity #=> -2 ;TI"#proc {|a,*b, c|}.arity #=> -3 ;TI" ;TI"*proc { |x = 0| }.arity #=> 0 ;TI"+lambda { |a = 0| }.arity #=> -1 ;TI"*proc { |x=0, y| }.arity #=> 1 ;TI"+lambda { |x=0, y| }.arity #=> -2 ;TI"*proc { |x=0, y=0| }.arity #=> 0 ;TI"+lambda { |x=0, y=0| }.arity #=> -1 ;TI"*proc { |x, y=0| }.arity #=> 1 ;TI"+lambda { |x, y=0| }.arity #=> -2 ;TI"*proc { |(x, y), z=0| }.arity #=> 1 ;TI"*lambda { |(x, y), z=0| }.arity #=> -2;T:@format0: @fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"prc.arity -> fixnum ;T0[ I"();T@)FI" Proc;TcRDoc::NormalClass00