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:
parent
4319c0235d
commit
9278fab680
1 changed files with 8 additions and 0 deletions
8
enum.c
8
enum.c
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue