From: kg67199@... Date: 2021-04-19T15:22:52+00:00 Subject: [ruby-core:103514] [Ruby master Bug#17814] inconsistent Array.zip behavior Issue #17814 has been updated by dzwdz (Kuba Prawdziwe-Nazwisko). note: sorry for the weird Fiber thing in the example code, that's not related to the bug an enumerator created with ```ruby step = 0.step e = Enumerator.produce { step.next } ``` would also have the same bug ---------------------------------------- Bug #17814: inconsistent Array.zip behavior https://bugs.ruby-lang.org/issues/17814#change-91611 * Author: dzwdz (Kuba Prawdziwe-Nazwisko) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- When using `Array.zip` with an enumerator, it "eats" an additional element off the end of it. `Enumerable.zip` has the expected behavior of only taking as many elements as it needs to. I've tested this on local ruby 2.7.2 and ruby 3.0.1 on carc.in. ---Files-------------------------------- test.rb (232 Bytes) output.txt (184 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: