summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_lazy_enumerator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 5feddd5bde..792a95bb7e 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -275,6 +275,11 @@ class TestLazyEnumerator < Test::Unit::TestCase
assert_equal(nil, a.current)
end
+ def test_take_bad_arg
+ a = Step.new(1..10)
+ assert_raise(ArgumentError) { a.lazy.take(-1) }
+ end
+
def test_take_recycle
bug6428 = '[ruby-dev:45634]'
a = Step.new(1..10)