From 0b841783b508c9bddb1c0117b1970fc7c350843b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 14 Oct 2003 10:09:39 +0000 Subject: * eval.c (ruby_finalize_0): return the given exit status unless SystemExit got raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ eval.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d90d779dc..b94caaa448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 14 19:09:35 2003 Nobuyoshi Nakada + + * eval.c (ruby_finalize_0): return the given exit status unless + SystemExit got raised. + Tue Oct 14 11:53:49 2003 Nobuyoshi Nakada * intern.h (ruby_stop): never return. diff --git a/eval.c b/eval.c index de615d29a5..d2963dfd10 100644 --- a/eval.c +++ b/eval.c @@ -1309,8 +1309,8 @@ ruby_options(argc, argv) void rb_exec_end_proc _((void)); static int -ruby_finalize_0(exp) - int exp; +ruby_finalize_0(ex) + int ex; { ruby_errinfo = 0; PUSH_TAG(PROT_NONE); @@ -1326,7 +1326,7 @@ ruby_finalize_0(exp) VALUE st = rb_iv_get(ruby_errinfo, "status"); return NUM2INT(st); } - return EXIT_SUCCESS; + return ex; } void -- cgit v1.2.3