diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 21:54:52 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 21:54:52 +0000 |
commit | 1d207fcff0e50ecdffb35b77bd10d2a3873cc8c3 (patch) | |
tree | 42a16c753d2e017dd76f04a64a9cf7ae99788640 /thread.c | |
parent | 2fa079b62ac3611ee7c52c605bd2da8209129895 (diff) | |
download | ruby-1d207fcff0e50ecdffb35b77bd10d2a3873cc8c3.tar.gz |
* thread.c (thread_start_func_2): remove unused code. security
level is checked before rb_eSecurityError raises.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -489,16 +489,8 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s if (state == TAG_FATAL) { /* fatal error within this thread, need to stop whole script */ } - else if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) { - if (th->safe_level >= 4) { - th->errinfo = rb_exc_new3(rb_eSecurityError, - rb_sprintf("Insecure exit at level %d", th->safe_level)); - errinfo = Qnil; - } - } - else if (th->safe_level < 4 && - (th->vm->thread_abort_on_exception || - th->abort_on_exception || RTEST(ruby_debug))) { + else if (th->vm->thread_abort_on_exception || + th->abort_on_exception || RTEST(ruby_debug)) { /* exit on main_thread */ } else { |