summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-19 07:03:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-19 07:03:06 +0000
commit3ae4fd7258fe518327a0ceb69c292eddbabfb995 (patch)
tree35ca43544604467644f99ad0376fef8a4c4dc1e0 /error.c
parentd63d8012f46d6a8ede9145db48be830cc114ad62 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/error.c b/error.c
index b3d900fb9b..03bc93f0e0 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);