mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer
used. [ruby-dev:38760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fa41dad1b2
commit
415d5ebc2f
7 changed files with 38 additions and 24 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jul 16 18:28:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer
|
||||
used. [ruby-dev:38760]
|
||||
|
||||
Thu Jul 16 17:41:28 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_method.c (rb_alias): fix a case which try non-existing method alias.
|
||||
|
|
1
eval.c
1
eval.c
|
@ -1063,7 +1063,6 @@ Init_eval(void)
|
|||
|
||||
exception_error = rb_exc_new3(rb_eFatal,
|
||||
rb_obj_freeze(rb_str_new2("exception reentered")));
|
||||
rb_ivar_set(exception_error, idThrowState, INT2FIX(TAG_FATAL));
|
||||
OBJ_TAINT(exception_error);
|
||||
OBJ_FREEZE(exception_error);
|
||||
}
|
||||
|
|
1
id.c
1
id.c
|
@ -24,7 +24,6 @@ Init_id(void)
|
|||
REGISTER_SYMID(idIFUNC, "<IFUNC>");
|
||||
REGISTER_SYMID(idCFUNC, "<CFUNC>");
|
||||
REGISTER_SYMID(idRespond_to, "respond_to?");
|
||||
REGISTER_SYMID(idThrowState, "#__ThrowState__");
|
||||
|
||||
REGISTER_SYMID(id_core_set_method_alias, "core#set_method_alias");
|
||||
REGISTER_SYMID(id_core_set_variable_alias, "core#set_variable_alias");
|
||||
|
|
30
id.h
30
id.h
|
@ -61,14 +61,13 @@ enum ruby_method_ids {
|
|||
idRespond_to = 366,
|
||||
idIFUNC = 367,
|
||||
idCFUNC = 368,
|
||||
idThrowState = 369,
|
||||
id_core_set_method_alias = 370,
|
||||
id_core_set_variable_alias = 371,
|
||||
id_core_undef_method = 372,
|
||||
id_core_define_method = 373,
|
||||
id_core_define_singleton_method = 374,
|
||||
id_core_set_postexe = 375,
|
||||
tLAST_TOKEN = 376,
|
||||
id_core_set_method_alias = 369,
|
||||
id_core_set_variable_alias = 370,
|
||||
id_core_undef_method = 371,
|
||||
id_core_define_method = 372,
|
||||
id_core_define_singleton_method = 373,
|
||||
id_core_set_postexe = 374,
|
||||
tLAST_TOKEN = 375,
|
||||
#endif
|
||||
idDot2 = tDOT2,
|
||||
idDot3 = tDOT3,
|
||||
|
@ -156,14 +155,13 @@ ruby_method_id_check_for(idNULL, 365);
|
|||
ruby_method_id_check_for(idRespond_to, 366);
|
||||
ruby_method_id_check_for(idIFUNC, 367);
|
||||
ruby_method_id_check_for(idCFUNC, 368);
|
||||
ruby_method_id_check_for(idThrowState, 369);
|
||||
ruby_method_id_check_for(id_core_set_method_alias, 370);
|
||||
ruby_method_id_check_for(id_core_set_variable_alias, 371);
|
||||
ruby_method_id_check_for(id_core_undef_method, 372);
|
||||
ruby_method_id_check_for(id_core_define_method, 373);
|
||||
ruby_method_id_check_for(id_core_define_singleton_method, 374);
|
||||
ruby_method_id_check_for(id_core_set_postexe, 375);
|
||||
ruby_method_id_check_for(tLAST_TOKEN, 376);
|
||||
ruby_method_id_check_for(id_core_set_method_alias, 369);
|
||||
ruby_method_id_check_for(id_core_set_variable_alias, 370);
|
||||
ruby_method_id_check_for(id_core_undef_method, 371);
|
||||
ruby_method_id_check_for(id_core_define_method, 372);
|
||||
ruby_method_id_check_for(id_core_define_singleton_method, 373);
|
||||
ruby_method_id_check_for(id_core_set_postexe, 374);
|
||||
ruby_method_id_check_for(tLAST_TOKEN, 375);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
1
parse.y
1
parse.y
|
@ -746,7 +746,6 @@ static void token_info_pop(struct parser_params*, const char *token);
|
|||
%nonassoc idRespond_to
|
||||
%nonassoc idIFUNC
|
||||
%nonassoc idCFUNC
|
||||
%nonassoc idThrowState
|
||||
%nonassoc id_core_set_method_alias
|
||||
%nonassoc id_core_set_variable_alias
|
||||
%nonassoc id_core_undef_method
|
||||
|
|
|
@ -223,4 +223,23 @@ class TestException < Test::Unit::TestCase
|
|||
end
|
||||
INPUT
|
||||
end
|
||||
|
||||
def test_safe4
|
||||
cmd = proc{raise SystemExit}
|
||||
safe0_p = proc{|*args| args}
|
||||
|
||||
test_proc = proc {
|
||||
$SAFE = 4
|
||||
begin
|
||||
cmd.call
|
||||
rescue SystemExit => e
|
||||
safe0_p["SystemExit: #{e.inspect}"]
|
||||
raise e
|
||||
rescue Exception => e
|
||||
safe0_p["Exception (NOT SystemExit): #{e.inspect}"]
|
||||
raise e
|
||||
end
|
||||
}
|
||||
assert_raise(SystemExit, '[ruby-dev:38760]') {test_proc.call}
|
||||
end
|
||||
end
|
||||
|
|
5
vm.c
5
vm.c
|
@ -1113,11 +1113,6 @@ vm_exec(rb_thread_t *th)
|
|||
|
||||
err = th->errinfo;
|
||||
|
||||
if (state == TAG_RAISE) {
|
||||
if (OBJ_FROZEN(err)) rb_exc_raise(err);
|
||||
rb_ivar_set(err, idThrowState, INT2FIX(state));
|
||||
}
|
||||
|
||||
exception_handler:
|
||||
cont_pc = cont_sp = catch_iseqval = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue