Skip to content

Commit 110a54f

Browse files
authored
Merge pull request #21 from nobu/ignore-experimental-warnings
assert_separately: Suppress experimental warnings
2 parents 99dd11c + c2dd855 commit 110a54f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/core_assertions.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def assert_separately(args, file = nil, line = nil, src, ignore_stderr: nil, **o
328328
args = args.dup
329329
args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
330330
args << "--debug" if RUBY_ENGINE == 'jruby' # warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
331+
# power_assert 3 requires ruby 3.1 or later
332+
args << "-W:no-experimental" if RUBY_VERSION < "3.1."
331333
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, capture_stdout, true, **opt)
332334
ensure
333335
if res_c

0 commit comments

Comments
 (0)