summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-19 02:14:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-19 02:14:14 +0000
commitb81a66d1ef2e578d9e248ea36d3cf4beb72bab53 (patch)
treec8b7dd7809d0f2058c70dd857de3eba96c080175 /eval.c
parent390adf6112228a4c32381a4882c8076ff6b44c84 (diff)
* eval.c (ruby_exec_node): no thread starts inside iseq compilation.
* eval.c (rb_f_raise): skip current control frame. [ruby-core:15589] * insns.def (opt_div): raise as the ordinary method. [ruby-core:15589] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index b738ec431e..e7d9c1f45e 100644
--- a/eval.c
+++ b/eval.c
@@ -225,9 +225,9 @@ ruby_exec_node(void *n, char *file)
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {
+ VALUE iseq = rb_iseq_new(n, rb_str_new2("<main>"),
+ rb_str_new2(file), Qfalse, ISEQ_TYPE_TOP);
SAVE_ROOT_JMPBUF(th, {
- VALUE iseq = rb_iseq_new(n, rb_str_new2("<main>"),
- rb_str_new2(file), Qfalse, ISEQ_TYPE_TOP);
th->base_block = 0;
val = rb_iseq_eval(iseq);
});
@@ -775,7 +775,9 @@ rb_f_raise(int argc, VALUE *argv)
argv = &err;
}
}
- rb_raise_jump(rb_make_exception(argc, argv));
+ err = rb_make_exception(argc, argv);
+ GET_THREAD()->cfp++;
+ rb_raise_jump(err);
return Qnil; /* not reached */
}