From: Denis de Bernardy Date: 2012-02-17T04:17:05+09:00 Subject: [ruby-core:42692] [ruby-trunk - Bug #5694] Proc#arity doesn't take optional arguments into account. 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/