summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_lazy_enumerator.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 22c39954ce..6548c35dba 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -292,6 +292,18 @@ class TestLazyEnumerator < Test::Unit::TestCase
assert_equal [[1, 42], [2, :foo]], zip.force
end
+ def test_zip_nonsingle
+ bug8735 = '[ruby-core:56383] [Bug #8735]'
+
+ obj = Object.new
+ def obj.each
+ yield
+ yield 1, 2
+ end
+
+ assert_equal(obj.to_enum.zip(obj.to_enum), obj.to_enum.lazy.zip(obj.to_enum).force, bug8735)
+ end
+
def test_take_rewound
bug7696 = '[ruby-core:51470]'
e=(1..42).lazy.take(2)