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:
Jeremy Evans 2021-04-09 10:44:07 -07:00
Родитель 582f4bc188
Коммит 9c31fb6114
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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).
*