From c372b1236ef04fcc3ac7689f2d0f32e8cc06c6ee Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 11 Apr 2016 08:06:19 +0000 Subject: [PATCH] test_iterator.rb: suppress warnings * test/ruby/test_iterator.rb (test_break): suppress "statement not reached" warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_iterator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb index 52eac0d59e..4a9cfe46f0 100644 --- a/test/ruby/test_iterator.rb +++ b/test/ruby/test_iterator.rb @@ -74,7 +74,7 @@ class TestIterator < Test::Unit::TestCase def test_break done = true loop{ - break + break if true done = false # should not reach here } assert(done) @@ -84,7 +84,7 @@ class TestIterator < Test::Unit::TestCase loop { break if done done = true - next + next if true bad = true # should not reach here } assert(!bad) @@ -94,7 +94,7 @@ class TestIterator < Test::Unit::TestCase loop { break if done done = true - redo + redo if true bad = true # should not reach here } assert(!bad)