From e9c728fea305bce19e712eeff9cc43d1994f069a Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 2 Oct 2009 10:54:31 +0000 Subject: update rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enum.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'enum.c') diff --git a/enum.c b/enum.c index d3503b1f5f..0f99fa2598 100644 --- a/enum.c +++ b/enum.c @@ -2239,6 +2239,18 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv) * # 20 * # ---------- * + * "svn proplist -R" produces multiline output for each file. + * They can be chunked as follows: + * + * IO.popen([{"LANG"=>"C"}, "svn", "proplist", "-R"]) {|f| + * f.lines.slice_before {|line| /^Prop/ =~ line }.each {|lines| p lines } + * } + * #=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\n"] + * # ["Properties on 'goruby.c':\n", " svn:keywords\n", " svn:eol-style\n"] + * # ["Properties on 'complex.c':\n", " svn:mime-type\n", " svn:eol-style\n"] + * # ["Properties on 'regparse.c':\n", " svn:keywords\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. * -- cgit v1.2.3