From 4b81b403eb606adbdc1c0126a46d0ed269076fa5 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Feb 2013 03:15:32 +0000 Subject: enumerator.c: suppress warnings * enumerator.c (lazy_zip_arrays_func, lazy_zip_func, lazy_take_func), (lazy_drop_func, lazy_drop_while_func): suppress uninitialized instance vriable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_lazy_enumerator.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby/test_lazy_enumerator.rb') diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb index c78a2d66cc..75f26f29b7 100644 --- a/test/ruby/test_lazy_enumerator.rb +++ b/test/ruby/test_lazy_enumerator.rb @@ -463,4 +463,13 @@ EOS end assert_equal Enumerator::Lazy, [].lazy.chunk{}.class, bug7507 end + + def test_no_warnings + le = (1..3).lazy + assert_warning("") {le.zip([4,5,6]).force} + assert_warning("") {le.zip(4..6).force} + assert_warning("") {le.take(1).force} + assert_warning("") {le.drop(1).force} + assert_warning("") {le.drop_while{false}.force} + end end -- cgit v1.2.3