ruby-changes:48552
From: nobu <ko1@a...>
Date: Mon, 6 Nov 2017 08:27:50 +0900 (JST)
Subject: [ruby-changes:48552] nobu:r60667 (trunk): test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]
nobu 2017-11-06 08:27:46 +0900 (Mon, 06 Nov 2017) New Revision: 60667 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60667 Log: test/ruby/test_lazy_enumerator.rb: test for [Bug #14082] Modified files: trunk/test/ruby/test_lazy_enumerator.rb Index: test/ruby/test_lazy_enumerator.rb =================================================================== --- test/ruby/test_lazy_enumerator.rb (revision 60666) +++ test/ruby/test_lazy_enumerator.rb (revision 60667) @@ -501,6 +501,13 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_lazy_enumerator.rb#L501 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/