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

ruby-changes:13432

From: akr <ko1@a...>
Date: Sat, 3 Oct 2009 08:10:47 +0900 (JST)
Subject: [ruby-changes:13432] Ruby:r25203 (trunk): rdoc update.

akr	2009-10-03 08:10:38 +0900 (Sat, 03 Oct 2009)

  New Revision: 25203

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

  Log:
    rdoc update.

  Modified files:
    trunk/enum.c

Index: enum.c
===================================================================
--- enum.c	(revision 25202)
+++ enum.c	(revision 25203)
@@ -2176,8 +2176,8 @@
 /*
  *  call-seq:
  *     enum.slice_before(pattern) => enumerator
- *     enum.slice_before {|elt| ... } => enumerator
- *     enum.slice_before(initial_state) {|elt, state| ... } => enumerator
+ *     enum.slice_before {|elt| bool } => enumerator
+ *     enum.slice_before(initial_state) {|elt, state| bool } => enumerator
  *
  *  Creates an enumerator for each chunked elements.
  *  The beginnings of chunks are defined by _pattern_ and the block.
@@ -2205,6 +2205,18 @@
  *      f.slice_before {|line| /\A\S/ === line }.each {|e| pp e}
  *    }
  *
+ * "svn proplist -R" produces multiline output for each file.
+ * They can be chunked as follows: 
+ *
+ *    IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
+ *      f.lines.slice_before(/\AProp/).each {|lines| p lines }
+ *    }
+ *    #=> ["Properties on '.':\n", "  svn:ignore\n", "  svk:merge\n"]
+ *    #   ["Properties on 'goruby.c':\n", "  svn:eol-style\n"]
+ *    #   ["Properties on 'complex.c':\n", "  svn:mime-type\n", "  svn:eol-style\n"]
+ *    #   ["Properties on 'regparse.c':\n", "  svn:eol-style\n"]
+ *    #   ...
+ *
  *  If the block needs to maintain state over multiple elements,
  *  local variables can be used.
  *  For example, monotonically increasing elements can be chunked as follows.
@@ -2254,17 +2266,6 @@
  *    #   20
  *    #   ----------
  *
- * "svn proplist -R" produces multiline output for each file.
- * They can be chunked as follows: 
- *
- *    IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
- *      f.lines.slice_before(/^Prop/).each {|lines| p lines }
- *    }
- *    #=> ["Properties on '.':\n", "  svn:ignore\n", "  svk:merge\n"]
- *    #   ["Properties on 'goruby.c':\n", "  svn:eol-style\n"]
- *    #   ["Properties on 'complex.c':\n", "  svn:mime-type\n", "  svn:eol-style\n"]
- *    #   ["Properties on 'regparse.c':\n", "  svn:eol-style\n"]
- *
  * mbox contains series of mails which start with Unix From line.
  * So each mail can be extracted by slice before Unix From line.
  *

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

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