summaryrefslogtreecommitdiff
path: root/doc/NEWS-2.7.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/NEWS-2.7.0')
-rw-r--r--doc/NEWS-2.7.010
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/NEWS-2.7.0 b/doc/NEWS-2.7.0
index 184b47fb8b..7607a473de 100644
--- a/doc/NEWS-2.7.0
+++ b/doc/NEWS-2.7.0
@@ -357,6 +357,16 @@ See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outsta
can be directly passed to another method as a block
argument. [Feature #15618]
+ * Added Enumerator::Lazy#with_index be lazy
+ Previously, Enumerator::Lazy#with_index was not defined, so it
+ picked up the default implementation from Enumerator, which was
+ not lazy. [Bug #7877]
+
+ ("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
+ # => 1:a
+ # 2:b
+ # 3:c
+
[Fiber]
[New method]