mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add test for Enumerator::Lazy#take
* test/ruby/test_lazy_enumerator.rb (test_take_bad_arg): Add test code in case of Enumerator::Lazy#take called with negative number. [ruby-dev:49467] [Bug #11933] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b1796737cf
commit
bd5d443a56
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Jan 1 08:53:02 2016 Yuki Kurihara <co000ri@gmail.com>
|
||||||
|
|
||||||
|
* test/ruby/test_lazy_enumerator.rb (test_take_bad_arg): Add test
|
||||||
|
code in case of Enumerator::Lazy#take called with negative number.
|
||||||
|
[ruby-dev:49467] [Bug #11933]
|
||||||
|
|
||||||
Fri Jan 1 05:06:20 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jan 1 05:06:20 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (parser_here_document): update indent for each line in
|
* parse.y (parser_here_document): update indent for each line in
|
||||||
|
|
|
@ -275,6 +275,11 @@ class TestLazyEnumerator < Test::Unit::TestCase
|
||||||
assert_equal(nil, a.current)
|
assert_equal(nil, a.current)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_take_bad_arg
|
||||||
|
a = Step.new(1..10)
|
||||||
|
assert_raise(ArgumentError) { a.lazy.take(-1) }
|
||||||
|
end
|
||||||
|
|
||||||
def test_take_recycle
|
def test_take_recycle
|
||||||
bug6428 = '[ruby-dev:45634]'
|
bug6428 = '[ruby-dev:45634]'
|
||||||
a = Step.new(1..10)
|
a = Step.new(1..10)
|
||||||
|
|
Loading…
Reference in a new issue