Issue #5694 has been updated by Denis de Bernardy.


Possibly related: http://bugs.ruby-lang.org/issues/6039
----------------------------------------
Bug #5694: Proc#arity doesn't take optional arguments into account. 
https://bugs.ruby-lang.org/issues/5694

Author: Marc-Andre Lafortune
Status: Open
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 
ruby -v: -


Currently:

    ->(foo = 42){}.arity # => 0, should be -1

This is contrary to the documentation and to what we should expect from the equivalent method definition.

Fixed in trunk, requesting backport for the 1.9 line.



-- 
http://bugs.ruby-lang.org/