diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-27 14:44:43 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-27 14:44:43 +0000 |
commit | 9278fab680e2bbbe9e443ad8ef2cec631800de2e (patch) | |
tree | 230e8f6b010e6c8450f29aefb17ca5ab91242fd6 | |
parent | 4319c0235d129e9a535432703e38a032fcf33e8f (diff) | |
download | ruby-9278fab680e2bbbe9e443ad8ef2cec631800de2e.tar.gz |
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | enum.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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. |