mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
call to_a at the top of Enumerabl#zip; ref #1961
This commit is contained in:
@@ -630,14 +630,14 @@ module Enumerable
|
||||
|
||||
def zip(*arg)
|
||||
ary = []
|
||||
arg = arg.map{|a|a.to_a}
|
||||
i = 0
|
||||
self.each do |*val|
|
||||
a = []
|
||||
a.push(val.__svalue)
|
||||
idx = 0
|
||||
while idx < arg.size
|
||||
a2 = arg[idx].to_a
|
||||
a.push(a2[i])
|
||||
a.push(arg[idx][i])
|
||||
idx += 1
|
||||
end
|
||||
ary.push(a)
|
||||
|
||||
Reference in New Issue
Block a user