[#97678] [Ruby master Feature#16752] :private param for const_set — bughitgithub@...
Issue #16752 has been reported by bughit (bug hit).
5 messages
2020/04/02
[ruby-core:97660] [Ruby master Bug#16748] Different behaviour between a hash and multi-Array when passing 2 arguments to a proc
From:
mnash@...
Date:
2020-04-01 15:45:44 UTC
List:
ruby-core #97660
Issue #16748 has been reported by Mattruby (Matthew Nash).
----------------------------------------
Bug #16748: Different behaviour between a hash and multi-Array when passing 2 arguments to a proc
https://bugs.ruby-lang.org/issues/16748
* Author: Mattruby (Matthew Nash)
* Status: Open
* Priority: Normal
* ruby -v: 2.7.0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
In Ruby 2.5.5 i get what i'm expecting
test = -> (one, two) { one }
[['one', 'two']].map(&test)
=> ["one"]
In Ruby 2.7.0 this doesn't work
test = -> (one, two) { one }
[['one', 'two']].map(&test)
wrong number of arguments (given 1, expected 2) (ArgumentError)
--
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>