From 441d7fe82116177a84aba4798aad03df980c0694 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 19 Feb 2001 07:03:06 +0000 Subject: * eval.c (secure_visibility): visibility check for untainted modules. * signal.c (sigpipe): sighandler which does nothing. * signal.c (trap): set sigpipe function for SIGPIPE. * signal.c (Init_signal): default SIGPIPE handler should be sigpipe function. * array.c (rb_ary_subseq): wrong boundary check. * parse.y (cond0): integer literal in condition should not be compared to lineno ($.). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index b3d900fb9..03bc93f0e 100644 --- a/error.c +++ b/error.c @@ -412,6 +412,13 @@ exc_set_backtrace(exc, bt) return rb_iv_set(exc, "bt", check_backtrace(bt)); } +static VALUE +exit_status(exc) + VALUE exc; +{ + return rb_iv_get(exc, "status"); +} + #ifdef __BEOS__ typedef struct { VALUE *list; @@ -554,6 +561,8 @@ Init_Exception() rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1); rb_eSystemExit = rb_define_class("SystemExit", rb_eException); + rb_define_method(rb_eSystemExit, "status", exit_status, 0); + rb_eFatal = rb_define_class("fatal", rb_eException); rb_eSignal = rb_define_class("SignalException", rb_eException); rb_eInterrupt = rb_define_class("Interrupt", rb_eSignal); -- cgit