Issue #5694 has been reported by Marc-Andre Lafortune.

----------------------------------------
Bug #5694: Proc#arity doesn't take optional arguments into account. 
http://redmine.ruby-lang.org/issues/5694

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


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://redmine.ruby-lang.org