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

test/ruby/test_exception.rb: suppress "warning: statement not reached"

This commit is contained in:
Yusuke Endoh 2021-04-27 17:06:51 +09:00
parent d405b1a878
commit ea88f49a76

View file

@ -126,7 +126,7 @@ class TestException < Test::Unit::TestCase
def test_exception_in_ensure_with_return
@string = "[ruby-core:97104] [Bug #16618]"
def self.meow
return
return if true # This if modifier suppresses "warning: statement not reached"
assert(false)
rescue
assert(false)