From: "marcandre (Marc-Andre Lafortune)" <ruby-core@...> Date: 2012-07-17T01:21:19+09:00 Subject: [ruby-core:46516] [ruby-trunk - Bug #5694] Proc#arity doesn't take optional arguments into account. Issue #5694 has been updated by marcandre (Marc-Andre Lafortune). matz (Yukihiro Matsumoto) wrote: > Because non-lambda proc and lamdba behave differently. > You can blame me about inconsistency. I should have designed proc more consistently. Oh, I'm not blaming anyone. > Nobu, could you update r36411 according to our discussion? I'm sorry about r36411. I reverted it when I realized Proc were meant to differ from lambdas. ---------------------------------------- Bug #5694: Proc#arity doesn't take optional arguments into account. https://bugs.ruby-lang.org/issues/5694#change-28156 Author: marcandre (Marc-Andre Lafortune) Status: Open Priority: Normal Assignee: nobu (Nobuyoshi Nakada) 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/