General

Profile

Mattruby (Matthew Nash)

  • Login: Mattruby
  • Registered on: 04/01/2020
  • Last sign in: 04/01/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

04/01/2020

05:49 PM Ruby Bug #16748: Different behaviour between a hash and multi-Array when passing 2 arguments to a proc
mame (Yusuke Endoh) wrote in #note-3:
> The behavior of 2.5.5 was wrong. `Array#map` yields each element, in this case, `['one', 'two']`, an array of two elements. The lambda requires two arguments, but one array is passed, which shou...
Mattruby (Matthew Nash)
03:45 PM Ruby Bug #16748 (Rejected): Different behaviour between a hash and multi-Array when passing 2 arguments to a proc
In Ruby 2.5.5 i get what i'm expecting
```ruby
test = -> (one, two) { one }
[['one', 'two']].map(&test)
=> ["one"]
```
In Ruby 2.7.0 this doesn't work
```ruby
test = -> (one, two) { one }
[['one', 'two']].map(&test)
wrong num...
Mattruby (Matthew Nash)

Also available in: Atom