[#97086] [Ruby master Bug#16612] Enumerator::ArithmeticSequence#last with float range produces incorrect value — muraken@...
Issue #16612 has been updated by mrkn (Kenta Murata).
4 messages
2020/02/07
[#97307] [Ruby master Feature#16663] Add block or filtered forms of Kernel#caller to allow early bail-out — headius@...
Issue #16663 has been reported by headius (Charles Nutter).
29 messages
2020/02/28
[ruby-core:97192] [Ruby master Bug#16640] Symbol#to_proc has incorrect arity
From:
kevin.deisz@...
Date:
2020-02-18 16:03:02 UTC
List:
ruby-core #97192
Issue #16640 has been updated by kddeisz (Kevin Deisz). To add some context, this came up because of https://github.com/rails/rails/pull/38474 - specifically https://github.com/rails/rails/blob/2fa1f7c48151617e13b4ad6ca065e47c8d7b42d0/activesupport/lib/active_support/callbacks.rb#L460-L461. The idea being that it's checking the arity to determine what kind of callback to build, but because Symbol#to_proc says it's -1, it actually results in an error. ---------------------------------------- Bug #16640: Symbol#to_proc has incorrect arity https://bugs.ruby-lang.org/issues/16640#change-84299 * Author: kddeisz (Kevin Deisz) * Status: Open * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- When you create a proc using Symbol#to_proc syntax, it reports the arity as -1, even though the required number of arguments is actually 1. This can happen based on `lambda(&:hash)`, `proc(&:hash)`, or `some_method(&:hash)`. Opened a PR with a fix here: https://github.com/ruby/ruby/pull/2913. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>