diff --git a/signal.c b/signal.c index c29a3fbc42..6f6b5452a9 100644 --- a/signal.c +++ b/signal.c @@ -71,12 +71,12 @@ static const struct signals { #ifdef SIGTRAP {"TRAP", SIGTRAP}, #endif -#ifdef SIGIOT - {"IOT", SIGIOT}, -#endif #ifdef SIGABRT {"ABRT", SIGABRT}, #endif +#ifdef SIGIOT + {"IOT", SIGIOT}, +#endif #ifdef SIGEMT {"EMT", SIGEMT}, #endif diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 80e43346d9..9ff414c367 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -220,7 +220,7 @@ module Test pid = status.pid faildesc = proc do signo = status.termsig - signame = Signal.list.invert[signo] + signame = Signal.signame(signo) sigdesc = "signal #{signo}" if signame sigdesc = "SIG#{signame} (#{sigdesc})" @@ -270,7 +270,7 @@ module Test def assert_ruby_status(args, test_stdin="", message=nil, opt={}) out, _, status = EnvUtil.invoke_ruby(args, test_stdin, true, :merge_to_stdout, opt) message ||= "ruby exit status is not success:" - assert(status.success?, FailDesc[status, message, out]) + assert(status.success?, FailDesc[status, "#{message} (#{status.inspect})", out]) end ABORT_SIGNALS = Signal.list.values_at(*%w"ILL ABRT BUS SEGV")