diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-10 15:59:18 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-12 18:51:57 +0900 |
| commit | 0ca3eed109c42711ac66d65637724045c280def3 (patch) | |
| tree | 0bda4840eb394831edd4d78a18eee72e7fa06f9d | |
| parent | f1972d400b5b8ecb7414b199e6a511dd832f0eb9 (diff) | |
assert_separately: Suppress experimental warnings
test-unit depends on power_assert that the recent versions require
ruby 3.1 or later. While test-unit rescues syntax error at loading
power_assert for old ruby versions, warnings for experimental features
are not suppressed, and `assert_separately` fails because stderr is
not empty, by default. Since adding `required_ruby_version` to
power_assert causes the installation with old rubygems to fail, we
just ignore warnings for experimental features totally.
| -rw-r--r-- | tool/lib/core_assertions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 6570af52aa..5d4c733a73 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -339,6 +339,8 @@ eom args = args.dup args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"}) args << "--debug" if RUBY_ENGINE == 'jruby' # warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag + # power_assert 3 requires ruby 3.1 or later + args << "-W:no-experimental" if RUBY_VERSION < "3.1." stdout, stderr, status = EnvUtil.invoke_ruby(args, src, capture_stdout, true, **opt) if sanitizers&.lsan_enabled? |
