Skip to content

Commit 2959e1b

Browse files
st0012matzbot
authored andcommitted
[ruby/irb] Suppress Ruby warnings in certain backtrace filtering
tests (ruby/irb#966) Since they're sensitive to the warnings, and the warnings are not relevant to the tests, we can suppress them to keep the tests simple. ruby/irb@ad642795da
1 parent 4dfd4e1 commit 2959e1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/irb/test_irb.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,13 @@ def build_irb
825825
end
826826

827827
class BacktraceFilteringTest < TestIRB::IntegrationTestCase
828+
def setup
829+
super
830+
# These tests are sensitive to warnings, so we disable them
831+
original_rubyopt = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")
832+
@envs["RUBYOPT"] = original_rubyopt + " -W0"
833+
end
834+
828835
def test_backtrace_filtering
829836
write_ruby <<~'RUBY'
830837
def foo

0 commit comments

Comments
 (0)