Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress Ruby warnings in certain backtrace filtering tests #966

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jun 9, 2024

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.

This should fix the current test failures on master.

@st0012 st0012 force-pushed the suppress-ruby-warnings-in-certain-tests branch 2 times, most recently from 5068027 to 3678c40 Compare June 9, 2024 12:24
@st0012 st0012 requested a review from tompng June 9, 2024 12:31
def setup
super
# These tests are sensitive to warnings, so we disable them
original_rubyopt = ENV["RUBYOPT"] || "" + (@envs["RUBYOPT"] || "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Precedence of the operator will be ENV["RUBYOPT"] || ("" + (@envs["RUBYOPT"] || ""))

How about this? It will make it chainable in subclasses. (expecting @envs["RUBYOPT"] already including ENV["RUBYOPT"] if it is not nil)

original_rubyopt = @envs["RUBYOPT"] || ENV["RUBYOPT"] || ""

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I think we need to include both values. So probably this instead:

      original_rubyopt = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")

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.
@st0012 st0012 force-pushed the suppress-ruby-warnings-in-certain-tests branch from 3678c40 to 0fd1656 Compare June 9, 2024 18:15
@st0012 st0012 requested a review from tompng June 9, 2024 18:15
@st0012 st0012 merged commit ad64279 into master Jun 9, 2024
55 of 59 checks passed
@st0012 st0012 deleted the suppress-ruby-warnings-in-certain-tests branch June 9, 2024 20:22
matzbot pushed a commit to ruby/ruby that referenced this pull request Jun 9, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants