зеркало из https://github.com/github/ruby.git
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:
Родитель
582f4bc188
Коммит
9c31fb6114
|
@ -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).
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче