ruby-changes:21380
From: drbrain <ko1@a...>
Date: Sat, 8 Oct 2011 08:56:38 +0900 (JST)
Subject: [ruby-changes:21380] drbrain:r33429 (trunk): * enum.c (group_by): Improve group_by description. Patch by b t. [#5411]
drbrain 2011-10-08 08:55:41 +0900 (Sat, 08 Oct 2011) New Revision: 33429 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33429 Log: * enum.c (group_by): Improve group_by description. Patch by b t. [#5411] Modified files: trunk/ChangeLog trunk/enum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33428) +++ ChangeLog (revision 33429) @@ -1,3 +1,8 @@ +Sat Oct 8 08:54:56 2011 Eric Hodel <drbrain@s...> + + * enum.c (group_by): Improve group_by description. Patch by b t. + [#5411] + Sat Oct 8 03:17:51 2011 Eric Hodel <drbrain@s...> * lib/shell.rb: Document some methods of Shell. Patch by Carol Index: enum.c =================================================================== --- enum.c (revision 33428) +++ enum.c (revision 33429) @@ -658,12 +658,12 @@ * 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]} * */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/