Bug #5411
closed
Added by bt (Bernd Homuth) about 13 years ago.
Updated almost 13 years ago.
Description
I tried to fix some of the method descriptions and made. Please check group_by if this is any better than the original version. I had trouble finding a concise description.
Thanks for reviewing.
Files
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33416.
b, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- enum.c: Clean up wording in Enumerable documentation. Patch by b t.
[Ruby 1.9 - Bug #5411
I improved group_by in r33417 based on your work.
I find the new group_by more confusing now and changed it to this:
- Groups the collection by result of the block. Returns a hash where the
- keys are the evaluated result from the block and the values are
- arrays of elements in the collection that correspond to the key.
-
- If no block is given an enumerator is returned.
-
-
(1..6).group_by { |i| i%3 } #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
Do you agree. I mean it's still not perfect but that double value sentence didn't make sense to me.
Thank you for reviewing
Yours is better, I applied it!
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0