From: Bernd Homuth Date: 2012-02-25T17:38:09+09:00 Subject: [ruby-core:42911] [ruby-trunk - Bug #5411] Some enum.c doc tweaks Issue #5411 has been updated by Bernd Homuth. Bernd Homuth wrote: > 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 ---------------------------------------- Bug #5411: Some enum.c doc tweaks https://bugs.ruby-lang.org/issues/5411 Author: Bernd Homuth Status: Closed Priority: Normal Assignee: Eric Hodel Category: DOC Target version: 2.0.0 ruby -v: -- 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. -- http://bugs.ruby-lang.org/