mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix documentation for Enumerator::Lazy#with_index
If a block is given, it returns a lazy enumerator that will iterate over the block, it doesn't iterate over the block immediately. Fixes [Bug #17789]
This commit is contained in:
parent
582f4bc188
commit
9c31fb6114
1 changed files with 2 additions and 1 deletions
|
@ -2709,7 +2709,8 @@ static const lazyenum_funcs lazy_with_index_funcs = {
|
|||
* lazy.with_index(offset = 0) {|(*args), idx| block }
|
||||
* lazy.with_index(offset = 0)
|
||||
*
|
||||
* If a block is given, iterates the given block for each element
|
||||
* If a block is given, returns a lazy enumerator that will
|
||||
* iterate over the given block for each element
|
||||
* with an index, which starts from +offset+, and returns a
|
||||
* lazy enumerator that yields the same values (without the index).
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue