summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-04-09 10:44:07 -0700
committerJeremy Evans <code@jeremyevans.net>2021-04-09 10:44:07 -0700
commit9c31fb61148c28153ca084149b7e887abdfa408a (patch)
tree67a5397f5bb280fcab6c9b88868cb764f8855792 /enumerator.c
parent582f4bc1889c3161f47a76b46b60d5b9c6fb0bde (diff)
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]
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c3
1 files changed, 2 insertions, 1 deletions
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).
*