summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 43bf9a02bf..a71bff20a4 100644
--- a/eval.c
+++ b/eval.c
@@ -29,9 +29,10 @@ static ID object_id, __send, __send_bang, respond_to;
VALUE rb_eLocalJumpError;
VALUE rb_eSysStackError;
-VALUE exception_error;
VALUE sysstack_error;
+static VALUE exception_error;
+
static VALUE eval(VALUE, VALUE, VALUE, const char *, int);
static inline VALUE rb_yield_0(int argc, VALUE *argv);
@@ -2726,6 +2727,10 @@ Init_eval(void)
rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */
rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);
+
+ exception_error = rb_exc_new2(rb_eFatal, "exception reentered");
+ rb_ivar_set(exception_error, idThrowState, INT2FIX(TAG_FATAL));
+ rb_register_mark_object(exception_error);
}