From 9c31fb61148c28153ca084149b7e887abdfa408a Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 9 Apr 2021 10:44:07 -0700 Subject: 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] --- enumerator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'enumerator.c') diff --git a/enumerator.c b/enumerator.c index a43434dd94..3ea4330802 100644 --- a/enumerator.c +++ b/enumerator.c @@ -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). * -- cgit v1.2.3