summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2024-06-09 21:22:27 +0100
committergit <svn-admin@ruby-lang.org>2024-06-09 20:22:34 +0000
commit2959e1b5ea053ca09ec8b5d6c1323c529f100e44 (patch)
treee054f7cb7ea6ecff88d5bf149dce95a3ebef02d1 /test
parent4dfd4e1d00c8492466e9f90f777819d3339bea60 (diff)
[ruby/irb] Suppress Ruby warnings in certain backtrace filtering
tests (https://github.com/ruby/irb/pull/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. https://github.com/ruby/irb/commit/ad642795da
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_irb.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb
index 28be744088..3d8044c5a1 100644
--- a/test/irb/test_irb.rb
+++ b/test/irb/test_irb.rb
@@ -825,6 +825,13 @@ module TestIRB
end
class BacktraceFilteringTest < TestIRB::IntegrationTestCase
+ def setup
+ super
+ # These tests are sensitive to warnings, so we disable them
+ original_rubyopt = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")
+ @envs["RUBYOPT"] = original_rubyopt + " -W0"
+ end
+
def test_backtrace_filtering
write_ruby <<~'RUBY'
def foo