diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index d0a4826936..44adb27f00 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -349,10 +349,14 @@ class TestGc < Test::Unit::TestCase ObjectSpace.define_finalizer(Object.new, f) end end; - status = assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595) - unless /mswin|mingw/ =~ RUBY_PLATFORM - assert_equal("INT", Signal.signame(status.termsig)) + out, err, status = assert_in_out_err(["-e", src], "", [], [], bug10595) do |*result| + break result end + unless /mswin|mingw/ =~ RUBY_PLATFORM + assert_equal("INT", Signal.signame(status.termsig), bug10595) + end + assert_match(/Interrupt/, err.first, proc {err.join("\n")}) + assert_empty(out) end def test_verify_internal_consistency