[前][次][番号順一覧][スレッド一覧]

ruby-changes:21368

From: drbrain <ko1@a...>
Date: Thu, 6 Oct 2011 10:01:31 +0900 (JST)
Subject: [ruby-changes:21368] drbrain:r33417 (trunk): * enum.c (group_by): Improve documentation based on patch by b t.

drbrain	2011-10-06 10:01:22 +0900 (Thu, 06 Oct 2011)

  New Revision: 33417

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33417

  Log:
    * enum.c (group_by):  Improve documentation based on patch by b t.

  Modified files:
    trunk/ChangeLog
    trunk/enum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33416)
+++ ChangeLog	(revision 33417)
@@ -1,7 +1,11 @@
+Thu Oct  6 10:00:54 2011  Eric Hodel  <drbrain@s...>
+
+	* enum.c (group_by):  Improve documentation based on patch by b t.
+
 Thu Oct  6 09:56:30 2011  Eric Hodel  <drbrain@s...>
 
 	* enum.c:  Clean up wording in Enumerable documentation.  Patch by b t.
-	  [Ruby 1.9 - Bug #5411
+	  [Ruby 1.9 - Bug #5411]
 
 Thu Oct  6 09:17:18 2011  Eric Hodel  <drbrain@s...>
 
Index: enum.c
===================================================================
--- enum.c	(revision 33416)
+++ enum.c	(revision 33417)
@@ -657,11 +657,11 @@
  *     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]}
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]