summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-enumerator/mrblib/enumerator.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-09-19 22:19:55 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-09-19 22:19:55 +0900
commit747059a718b9c6538891a21df69bad9998c51ad0 (patch)
treecee6be6a11aa63a9f0b9ab037f0cba96b860c7fd /mrbgems/mruby-enumerator/mrblib/enumerator.rb
parentb6c5e501b370e0758e9f1e224b2dd363df4f0998 (diff)
downloadmruby-747059a718b9c6538891a21df69bad9998c51ad0.tar.gz
mruby-747059a718b9c6538891a21df69bad9998c51ad0.zip
Removed `to_ary` conversion method.
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)"