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 | f4bb41d5cf504831d072bd5349937f03f93d1dd1 (patch) | |
tree | 47af05b9ddbcbcc5e8d0e177907160f9c6cf9ec0 | |
parent | be02351b6bde64558df258132a8b3e3452db46f7 (diff) | |
download | ruby-f4bb41d5cf504831d072bd5349937f03f93d1dd1.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 |