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

ruby-changes:12882

From: akr <ko1@a...>
Date: Sat, 22 Aug 2009 00:19:11 +0900 (JST)
Subject: [ruby-changes:12882] Ruby:r24618 (trunk): rdoc update.

akr	2009-08-22 00:18:57 +0900 (Sat, 22 Aug 2009)

  New Revision: 24618

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

  Log:
    rdoc update.

  Modified files:
    trunk/enumerator.c

Index: enumerator.c
===================================================================
--- enumerator.c	(revision 24617)
+++ enumerator.c	(revision 24618)
@@ -30,13 +30,14 @@
  * The enumerator has with_index.
  * So ary.map.with_index works as follows.
  *
- *   p [1,2,3].map.with_index {|o, i| o+i } #=> [1, 3, 5]
+ *   p %w[foo bar baz].map.with_index {|w,i| "#{i}:#{w}" }
+ *   #=> ["0:foo", "1:bar", "2:baz"]
  *
  * An enumerator object can be used as an external iterator.
  * I.e.  Enumerator#next returns the next value of the iterator.
  * Enumerator#next raises StopIteration at end.
  *
- *   e = [1,2,3].each   # enumerator object.
+ *   e = [1,2,3].each   # returns an enumerator object.
  *   p e.next   #=> 1
  *   p e.next   #=> 2
  *   p e.next   #=> 3

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

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