Project

General

Profile

Actions

Bug #17814

closed

inconsistent Array.zip behavior

Added by dzwdz (Kuba Prawdziwe-Nazwisko) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
[ruby-core:103513]

Description

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) test.rb dzwdz (Kuba Prawdziwe-Nazwisko), 04/19/2021 03:00 PM
output.txt (184 Bytes) output.txt dzwdz (Kuba Prawdziwe-Nazwisko), 04/19/2021 03:00 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0