[#49078] DevelopersMeeting20150728Japan — SASADA Koichi <ko1@...>
Hi,
5 messages
2015/06/12
[ruby-dev:49134] [Ruby trunk - Bug #11296] Proc#arity returns weird value for non-lambda proc with optional arguments
From:
ruby-core@...
Date:
2015-06-24 05:25:46 UTC
List:
ruby-dev #49134
Issue #11296 has been updated by Marc-Andre Lafortune.
This is intentional, as per #5694 (note 22). It is not really related to #7765.
FWIW, I still believe it was not the best decision.
----------------------------------------
Bug #11296: Proc#arity returns weird value for non-lambda proc with optional arguments
https://bugs.ruby-lang.org/issues/11296#change-53101
* Author: Yukihiro Matsumoto
* Status: Feedback
* 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/