diff options
| author | Jeremy Evans <code@jeremyevans.net> | 2024-07-19 13:08:11 -0700 |
|---|---|---|
| committer | Jeremy Evans <code@jeremyevans.net> | 2024-07-20 18:16:42 -0700 |
| commit | e7dda086170a5eaa037ddd5ebfcdc3aade15a26d (patch) | |
| tree | 0285f761c91f693369a503cecd4f1b041b009e81 /test/ruby | |
| parent | 84680dc255f3219da8d07684372d9ee623f7ac04 (diff) | |
Do not set Enumerator::Lazy#zip to use packed format
Enumerator#zip yields a single array, not multiple arguments,
so Enumerator::Lazy#zip should do the same.
Fixes [#20623]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11212
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_lazy_enumerator.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb index 22127e903a..4dddbab50c 100644 --- a/test/ruby/test_lazy_enumerator.rb +++ b/test/ruby/test_lazy_enumerator.rb @@ -489,6 +489,10 @@ EOS assert_equal [1, 2, 3], enum.map { |x| x / 2 } end + def test_lazy_zip_map_yield_arity_bug_20623 + assert_equal([[1, 2]], [1].lazy.zip([2].lazy).map { |x| x }.force) + end + def test_lazy_to_enum lazy = [1, 2, 3].lazy def lazy.foo(*args) |
