From: matz@... Date: 2015-06-24T06:53:19+00:00 Subject: [ruby-dev:49137] [Ruby trunk - Bug #11296] [Closed] Proc#arity returns weird value for non-lambda proc with optional arguments Issue #11296 has been updated by Yukihiro Matsumoto. Status changed from Feedback to Closed Marc-Andre, thank you for the info. You have made the issue clear. Now I can safely close the issue. Matz. ---------------------------------------- Bug #11296: Proc#arity returns weird value for non-lambda proc with optional arguments https://bugs.ruby-lang.org/issues/11296#change-53105 * Author: Yukihiro Matsumoto * Status: Closed * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- `Proc.new(x=0){}.arity` returns 0, not -1 unlike lambdas. I don't remember if it's intentional or not. Anyone remember? Matz. -- https://bugs.ruby-lang.org/