Skip to content

Commit

Permalink
[ruby/irb] Suppress Ruby warnings in certain backtrace filtering
Browse files Browse the repository at this point in the history
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
  • Loading branch information
st0012 authored and matzbot committed Jun 9, 2024
1 parent 4dfd4e1 commit 2959e1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/irb/test_irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")
@envs["RUBYOPT"] = original_rubyopt + " -W0"
end

def test_backtrace_filtering
write_ruby <<~'RUBY'
def foo
Expand Down

0 comments on commit 2959e1b

Please sign in to comment.