git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

This commit is contained in:
headius 2013-03-10 20:02:47 +00:00
Родитель cbd15bdb95
Коммит 11125bf46a
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -322,11 +322,11 @@ class TestLazyEnumerator < Test::Unit::TestCase
def test_drop_while
a = Step.new(1..10)
assert_equal(5, a.drop_while {|i| i < 5}.first)
assert_equal(5, a.drop_while {|i| i % 5 > 0}.first)
assert_equal(10, a.current)
assert_equal(5, a.lazy.drop_while {|i| i < 5}.first)
assert_equal(5, a.lazy.drop_while {|i| i % 5 > 0}.first)
assert_equal(5, a.current)
assert_equal((5..10).to_a, a.lazy.drop_while {|i| i < 5}.to_a)
assert_equal((5..10).to_a, a.lazy.drop_while {|i| i % 5 > 0}.to_a)
end
def test_drop_and_take