git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-10-02 10:54:31 +00:00
Родитель 9dbf7dc6dd
Коммит e9c728fea3
1 изменённых файлов: 12 добавлений и 0 удалений

12
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.
*