1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rdoc update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-09-27 14:44:43 +00:00
parent 4319c0235d
commit 9278fab680

8
enum.c
View file

@ -2067,6 +2067,14 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* # "\n"]
* # ...
*
* paragraphs separated by empty lines can be parsed as follows.
*
* File.foreach("README").chunk {|line|
* /\A\s*\z/ !~ line || nil
* }.each {|_, lines|
* pp lines
* }
*
* :_alone can be used to pass through bunch of elements.
* For example, sort consective lines formed as Foo#bar and
* pass other lines, chunk can be used as follows.