Skip to content

Commit 260ac23

Browse files
committed
Use success option to check if the process failed
1 parent f0371ef commit 260ac23

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/ruby/test_rubyoptions.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -870,13 +870,12 @@ def test_segv_test
870870
def test_segv_loaded_features
871871
bug7402 = '[ruby-core:49573]'
872872

873-
status = assert_segv(['-e', "END {#{SEGVTest::KILL_SELF}}",
874-
'-e', 'class Bogus; def to_str; exit true; end; end',
875-
'-e', '$".clear',
876-
'-e', '$".unshift Bogus.new',
877-
'-e', '(p $"; abort) unless $".size == 1',
878-
])
879-
assert_not_predicate(status, :success?, "segv but success #{bug7402}")
873+
assert_segv(['-e', "END {#{SEGVTest::KILL_SELF}}",
874+
'-e', 'class Bogus; def to_str; exit true; end; end',
875+
'-e', '$".clear',
876+
'-e', '$".unshift Bogus.new',
877+
'-e', '(p $"; abort) unless $".size == 1',
878+
], success: false)
880879
end
881880

882881
def test_segv_setproctitle

0 commit comments

Comments
 (0)