diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_lazy_enumerator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb index 8c03c700c3..e09c3af837 100644 --- a/test/ruby/test_lazy_enumerator.rb +++ b/test/ruby/test_lazy_enumerator.rb @@ -336,5 +336,10 @@ EOS assert_equal nil, lazy.send(m){}.size end assert_equal nil, lazy.grep(//).size + + assert_equal 2, lazy.take(2).size + assert_equal 3, lazy.take(4).size + assert_equal 4, loop.lazy.take(4).size + assert_equal nil, lazy.select{}.take(4).size end end |