mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cbd15bdb95
commit
11125bf46a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue