summaryrefslogtreecommitdiff
path: root/test/ruby/test_lazy_enumerator.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2023-06-21 09:44:30 -0700
committerJeremy Evans <code@jeremyevans.net>2023-06-24 08:41:32 -0700
commita14915ca4baae40f08d288a38b8bfb595500ad90 (patch)
treeda46d04bb7e32a5be8024db9f0a40b64e19ce627 /test/ruby/test_lazy_enumerator.rb
parentc94b5f121dae49b931349ec60da243f98c8e3d82 (diff)
Do not have Enumeratory::Lazy#zip mark result as packed
Fixes [Bug #19569]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7967
Diffstat (limited to 'test/ruby/test_lazy_enumerator.rb')
-rw-r--r--test/ruby/test_lazy_enumerator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 32bf097318..22127e903a 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -282,6 +282,11 @@ class TestLazyEnumerator < Test::Unit::TestCase
assert_equal(3, a.current)
end
+ def test_zip_map_lambda_bug_19569
+ ary = [1, 2, 3].to_enum.lazy.zip([:a, :b, :c]).map(&:last).to_a
+ assert_equal([:a, :b, :c], ary)
+ end
+
def test_take
a = Step.new(1..10)
assert_equal(1, a.take(5).first)