summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-enumerator/mrblib/enumerator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-enumerator/mrblib/enumerator.rb')
-rw-r--r--mrbgems/mruby-enumerator/mrblib/enumerator.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/mrbgems/mruby-enumerator/mrblib/enumerator.rb b/mrbgems/mruby-enumerator/mrblib/enumerator.rb
index 22856a91b..ae692dd12 100644
--- a/mrbgems/mruby-enumerator/mrblib/enumerator.rb
+++ b/mrbgems/mruby-enumerator/mrblib/enumerator.rb
@@ -621,9 +621,7 @@ module Enumerable
# use Enumerator to use infinite sequence
def zip(*args, &block)
args = args.map do |a|
- if a.respond_to?(:to_ary)
- a.to_ary.to_enum(:each)
- elsif a.respond_to?(:each)
+ if a.respond_to?(:each)
a.to_enum(:each)
else
raise TypeError, "wrong argument type #{a.class} (must respond to :each)"