diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-24 07:50:33 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-24 07:50:33 +0000 |
commit | aab2f788d784ef73dd088f7cc6e258672da0ae59 (patch) | |
tree | ec88f460bf49be33656ac573be0024aec1d3b039 /test/ruby | |
parent | 1af390b1ea11acd00558e8d86d23d17d328e580d (diff) | |
download | ruby-aab2f788d784ef73dd088f7cc6e258672da0ae59.tar.gz |
* enumerator.c (lazy_zip): raise error for bad arguments
[Bug #7706]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 3d05d333fb..65f0446b52 100644 --- a/test/ruby/test_lazy_enumerator.rb +++ b/test/ruby/test_lazy_enumerator.rb @@ -213,6 +213,11 @@ class TestLazyEnumerator < Test::Unit::TestCase assert_equal(1, a.current) end + def test_zip_bad_arg + a = Step.new(1..3) + assert_raise(TypeError){ a.lazy.zip(42) } + end + def test_zip_with_block # zip should be eager when a block is given a = Step.new(1..3) |