diff options
author | Jeremy Evans <code@jeremyevans.net> | 2023-06-21 09:44:30 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2023-06-24 08:41:32 -0700 |
commit | a14915ca4baae40f08d288a38b8bfb595500ad90 (patch) | |
tree | da46d04bb7e32a5be8024db9f0a40b64e19ce627 /test/ruby/test_lazy_enumerator.rb | |
parent | c94b5f121dae49b931349ec60da243f98c8e3d82 (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.rb | 5 |
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) |