From ad9473d604eef2d342a5a12ebe7fdafe3260217c Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 14 Aug 2007 10:53:53 +0000 Subject: * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move init place of exception_error. * inits.c: ditto. * eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL. [ruby-dev:31407] * bootstraptest/test_exception.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 43bf9a02b..a71bff20a 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); } -- cgit