From a14915ca4baae40f08d288a38b8bfb595500ad90 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 21 Jun 2023 09:44:30 -0700 Subject: Do not have Enumeratory::Lazy#zip mark result as packed Fixes [Bug #19569] --- test/ruby/test_lazy_enumerator.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') 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) -- cgit v1.2.3