From 82f1f640ec4a59bd77cde7fee509080828406835 Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 7 Oct 2011 23:55:41 +0000 Subject: [PATCH] * enum.c (group_by): Improve group_by description. Patch by b t. [#5411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ enum.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5fa02f8a8..5a0d061ea9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 8 08:54:56 2011 Eric Hodel + + * enum.c (group_by): Improve group_by description. Patch by b t. + [#5411] + Sat Oct 8 03:17:51 2011 Eric Hodel * lib/shell.rb: Document some methods of Shell. Patch by Carol diff --git a/enum.c b/enum.c index 7a94ef658f..63997191d0 100644 --- a/enum.c +++ b/enum.c @@ -658,12 +658,12 @@ group_by_i(VALUE i, VALUE hash, int argc, VALUE *argv) * enum.group_by -> an_enumerator * * Groups the collection by result of the block. Returns a hash where the - * keys are the evaluated result from the block and values the values are - * arrays of elements in the collection that corresponding to the key. + * 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]} + * (1..6).group_by { |i| i%3 } #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} * */