mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress "statement not reached" warning
This commit is contained in:
parent
cc68084652
commit
75129c62eb
2 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,9 @@ class TestIseqLoad < Test::Unit::TestCase
|
|||
begin;
|
||||
3.times { 3.times { next; @next_broke = true } }
|
||||
end;
|
||||
a = ISeq.compile(src, __FILE__, __FILE__, line).to_a
|
||||
a = EnvUtil.suppress_warning {
|
||||
ISeq.compile(src, __FILE__, __FILE__, line)
|
||||
}.to_a
|
||||
iseq = ISeq.iseq_load(a)
|
||||
iseq.eval
|
||||
assert_equal false, @next_broke
|
||||
|
|
|
@ -347,7 +347,7 @@ class TestRubyOptimization < Test::Unit::TestCase
|
|||
def test_tailcall_inhibited_by_rescue
|
||||
bug12082 = '[ruby-core:73871] [Bug #12082]'
|
||||
|
||||
tailcall("#{<<-"begin;"}\n#{<<~"end;"}")
|
||||
EnvUtil.suppress_warning {tailcall("#{<<-"begin;"}\n#{<<~"end;"}")}
|
||||
begin;
|
||||
def to_be_rescued
|
||||
return do_raise
|
||||
|
|
Loading…
Add table
Reference in a new issue