diff --git a/process.c b/process.c index 75af4bd073..ace15b1c71 100644 --- a/process.c +++ b/process.c @@ -3532,8 +3532,7 @@ rb_exit(int status) args[1] = rb_str_new2("exit"); rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit)); } - ruby_finalize(); - exit(status); + ruby_stop(status); }