diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-27 14:25:33 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-27 14:25:33 +0900 |
| commit | 69b4842a0316b079c52a6b28d75a66e258b5b77c (patch) | |
| tree | e40c952a36d760aa6b789a095367ddc2adf99100 /mrbgems/mruby-enum-ext | |
| parent | c2ad8098a571c9ae211b4e44b8857804ec3901d5 (diff) | |
| download | mruby-69b4842a0316b079c52a6b28d75a66e258b5b77c.tar.gz mruby-69b4842a0316b079c52a6b28d75a66e258b5b77c.zip | |
call to_a at the top of Enumerabl#zip; ref #1961
Diffstat (limited to 'mrbgems/mruby-enum-ext')
| -rw-r--r-- | mrbgems/mruby-enum-ext/mrblib/enum.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-enum-ext/mrblib/enum.rb b/mrbgems/mruby-enum-ext/mrblib/enum.rb index 8ca7fd8bb..d6959e26f 100644 --- a/mrbgems/mruby-enum-ext/mrblib/enum.rb +++ b/mrbgems/mruby-enum-ext/mrblib/enum.rb @@ -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) |
