I was reading the official docs
http://www.ruby-doc.org/core-2.1.0/Proc.html#method-i-arity. Where
`lambda#arity` calculstion made me confused. Then from
http://stackoverflow.com/questions/16986471/proc-arity-vs-lambda-arity I
got some clue that `lambda#arity` always one complements of `Proc#arity`
?

Code :

(arup~>~)$ pry --simple-prompt
>> proc { |(x, y), z=0| }.arity
=> 1
>> lambda { |(x, y), z=0| }.arity
=> -2
>> proc { |x=0, y=0| }.arity
=> 0
>> lambda { |x=0, y=0| }.arity
=> -1
>>

Now my direct question is - Why lambda#arity always one complements of
Proc#arity ?

But one example again made my all assumptions are less confident about
`lambda#arity` calculation. See below :

>> proc {}.arity
=> 0
>> lambda {}.arity
=> 0

Where does here `lambda#arity` not one complements of Proc#arity ?

-- 
Posted via http://www.ruby-forum.com/.