From f0371efbd87f72f140cbb6ea105a261ff1b23772 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 16 Jun 2025 19:18:11 +0900 Subject: Suppress stderr output in `TestRubyOptions#assert_segv` It is checked against the given `list`, do not print the same output twice. --- test/ruby/test_rubyoptions.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index e2c3a687c4..69f30c1ce3 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -787,6 +787,12 @@ class TestRubyOptions < Test::Unit::TestCase unless /mswin|mingw/ =~ RUBY_PLATFORM opts[:rlimit_core] = 0 end + opts[:failed] = proc do |status, message = "", out = ""| + if (sig = status.termsig) && Signal.list["SEGV"] == sig + out = "" + end + Test::Unit::CoreAssertions::FailDesc[status, message] + end ExecOptions = opts.freeze # The regexp list that should match the entire stderr output. -- cgit v1.2.3