From 260ac23a53e8db93087216d115aa4b054e9cf35b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 16 Jun 2025 19:20:48 +0900 Subject: Use `success` option to check if the process failed --- test/ruby/test_rubyoptions.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 69f30c1ce3..54ad953ee9 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -870,13 +870,12 @@ class TestRubyOptions < Test::Unit::TestCase def test_segv_loaded_features bug7402 = '[ruby-core:49573]' - status = assert_segv(['-e', "END {#{SEGVTest::KILL_SELF}}", - '-e', 'class Bogus; def to_str; exit true; end; end', - '-e', '$".clear', - '-e', '$".unshift Bogus.new', - '-e', '(p $"; abort) unless $".size == 1', - ]) - assert_not_predicate(status, :success?, "segv but success #{bug7402}") + assert_segv(['-e', "END {#{SEGVTest::KILL_SELF}}", + '-e', 'class Bogus; def to_str; exit true; end; end', + '-e', '$".clear', + '-e', '$".unshift Bogus.new', + '-e', '(p $"; abort) unless $".size == 1', + ], success: false) end def test_segv_setproctitle -- cgit v1.2.3