aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-06 01:01:22 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-06 01:01:22 +0000
commit8f6cb4b4738027a20228f4731e8731b7bc29fef4 (patch)
tree79dd3a1632a8fc0d4c74b68ab9edd8d4fe4d1a3f /enum.c
parente2974b1a4b3263c8c66581f6e3943c193b1e2d3b (diff)
downloadruby-8f6cb4b4738027a20228f4731e8731b7bc29fef4.tar.gz
* enum.c (group_by): Improve documentation based on patch by b t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/enum.c b/enum.c
index 3120b066da..7a94ef658f 100644
--- a/enum.c
+++ b/enum.c
@@ -657,11 +657,11 @@ group_by_i(VALUE i, VALUE hash, int argc, VALUE *argv)
* enum.group_by {| obj | block } -> a_hash
* enum.group_by -> an_enumerator
*
- * Returns a hash, which keys are evaluated result from the
- * block, and values are arrays of elements in <i>enum</i>
- * corresponding to the key.
+ * 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.
*
- * If no block is given, an enumerator is returned instead.
+ * 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]}
*