From: Marc-Andre Lafortune Date: 2011-12-01T20:16:06+09:00 Subject: [ruby-core:41431] [ruby-trunk - Bug #5694][Open] Proc#arity doesn't take optional arguments into account. 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