1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-04-11 08:06:19 +00:00
parent ba56de8b06
commit c372b1236e

View file

@ -74,7 +74,7 @@ class TestIterator < Test::Unit::TestCase
def test_break def test_break
done = true done = true
loop{ loop{
break break if true
done = false # should not reach here done = false # should not reach here
} }
assert(done) assert(done)
@ -84,7 +84,7 @@ class TestIterator < Test::Unit::TestCase
loop { loop {
break if done break if done
done = true done = true
next next if true
bad = true # should not reach here bad = true # should not reach here
} }
assert(!bad) assert(!bad)
@ -94,7 +94,7 @@ class TestIterator < Test::Unit::TestCase
loop { loop {
break if done break if done
done = true done = true
redo redo if true
bad = true # should not reach here bad = true # should not reach here
} }
assert(!bad) assert(!bad)