From f767ddf8f56ea2dc4a7d5dcdc97f78c298ff7932 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 9 Jun 2024 12:55:52 +0100 Subject: [PATCH] Suppress Ruby warnings in certain backtrace filtering tests 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. --- test/irb/test_irb.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb index 28be74408..6755f0ef9 100644 --- a/test/irb/test_irb.rb +++ b/test/irb/test_irb.rb @@ -825,6 +825,13 @@ def build_irb end class BacktraceFilteringTest < TestIRB::IntegrationTestCase + def setup + super + # These tests are sensitive to warnings, so we disable them + original_rubyopt = @envs["RUBYOPT"] || "" + @envs["RUBYOPT"] = original_rubyopt + " -W0" + end + def test_backtrace_filtering write_ruby <<~'RUBY' def foo