diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-14 10:53:53 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-14 10:53:53 +0000 |
commit | 14c3aa52aeff4fed170b3dbe8666aaa851b654d2 (patch) | |
tree | 6f2a895bac75e382b9d4e71e1bb09f92cdafbc4b /eval.c | |
parent | 9cdeae9dad9f8ac8fe50b6b6f01ecd76f21f5e6b (diff) | |
download | ruby-14c3aa52aeff4fed170b3dbe8666aaa851b654d2.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |