rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Module Enumerable

Open PabloVent opened this issue 5 years ago • 1 comments

I'm referring to the #group_by method. The use example:

(1..6).group_by { |i| i%3 }

Shows an erroneous return value, namely: #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}. It should be: {1=>[1, 4], 2=>[2, 5], 0=>[3, 6]}; I tried it in irb. I'm using ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19].

Thanks.

PabloVent avatar May 07 '20 11:05 PabloVent

Fixed by https://github.com/ruby/ruby/pull/4906

adam12 avatar May 15 '22 13:05 adam12