summaryrefslogtreecommitdiffstats
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
commit441d7fe82116177a84aba4798aad03df980c0694 (patch)
tree35ca43544604467644f99ad0376fef8a4c4dc1e0 /error.c
parentc70fa7e9682e25a9d52ebb8ac67c710b93d2300c (diff)
downloadruby-441d7fe82116177a84aba4798aad03df980c0694.tar.gz
ruby-441d7fe82116177a84aba4798aad03df980c0694.tar.xz
ruby-441d7fe82116177a84aba4798aad03df980c0694.zip
* 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
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 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);