aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_lazy_enumerator.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index e6888583f9..4db58e7619 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -501,6 +501,13 @@ EOS
assert_equal Float::INFINITY, loop.lazy.cycle.size
assert_equal nil, lazy.select{}.cycle(4).size
assert_equal nil, lazy.select{}.cycle.size
+
+ class << (obj = Object.new)
+ def each; end
+ def size; 0; end
+ include Enumerable
+ end
+ assert_equal 0, obj.lazy.cycle.size
end
def test_map_zip