Skip to content

Commit

Permalink
Pass --debug to eliminate trace warnings on JRuby
Browse files Browse the repository at this point in the history
power_assert enables traces, which are only partially supported on
JRuby without --debug. The warning that results breaks
assert_separately due to stderr output from the child process.
  • Loading branch information
headius authored and nobu committed Jan 29, 2021
1 parent c27e9f5 commit b771832
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/lib/core_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ class Test::Unit::Runner
eom
args = args.dup
args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
# JRuby needs --debug for trace support in power_assert
args.push("--debug") if RUBY_ENGINE == 'jruby'
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, **opt)
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
assert(!abort, FailDesc[status, nil, stderr])
Expand Down

0 comments on commit b771832

Please sign in to comment.