mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if
exception raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
238738f314
commit
f32f40cc49
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jun 24 22:14:36 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if
|
||||||
|
exception raised.
|
||||||
|
|
||||||
Tue Jun 24 22:09:18 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
Tue Jun 24 22:09:18 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
* ext/win32ole/win32ole.c(ole_invoke): fix memory leak.
|
* ext/win32ole/win32ole.c(ole_invoke): fix memory leak.
|
||||||
|
|
|
@ -664,12 +664,14 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
rb_env_t *env = NULL;
|
rb_env_t *env = NULL;
|
||||||
rb_block_t block;
|
rb_block_t block;
|
||||||
|
volatile int parse_in_eval;
|
||||||
|
|
||||||
if (file == 0) {
|
if (file == 0) {
|
||||||
file = rb_sourcefile();
|
file = rb_sourcefile();
|
||||||
line = rb_sourceline();
|
line = rb_sourceline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parse_in_eval = th->parse_in_eval;
|
||||||
PUSH_TAG();
|
PUSH_TAG();
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
rb_iseq_t *iseq;
|
rb_iseq_t *iseq;
|
||||||
|
@ -726,6 +728,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
|
||||||
result = vm_eval_body(th);
|
result = vm_eval_body(th);
|
||||||
}
|
}
|
||||||
POP_TAG();
|
POP_TAG();
|
||||||
|
th->parse_in_eval = parse_in_eval;
|
||||||
|
|
||||||
if (state) {
|
if (state) {
|
||||||
if (state == TAG_RAISE) {
|
if (state == TAG_RAISE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue