aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/process.c b/process.c
index 324d112e0b..7f5c641852 100644
--- a/process.c
+++ b/process.c
@@ -3857,8 +3857,10 @@ rb_f_abort(int argc, const VALUE *argv)
{
rb_check_arity(argc, 0, 1);
if (argc == 0) {
- if (!NIL_P(GET_THREAD()->errinfo)) {
- ruby_error_print();
+ rb_thread_t *th = GET_THREAD();
+ VALUE errinfo = th->errinfo;
+ if (!NIL_P(errinfo)) {
+ rb_threadptr_error_print(th, errinfo);
}
rb_exit(EXIT_FAILURE);
}