diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-05 23:27:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-05 23:27:46 +0000 |
commit | 6c1f11592c6e8f5347b758e66c869bde7ca32733 (patch) | |
tree | 47af05b9ddbcbcc5e8d0e177907160f9c6cf9ec0 | |
parent | dcb8a22f2670626198ecf1c805b53bd13350d899 (diff) | |
download | ruby-6c1f11592c6e8f5347b758e66c869bde7ca32733.tar.gz |
test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_lazy_enumerator.rb | 7 |
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 |