From f32f40cc495d9372cc71a1131ee8298e6bb46cd1 Mon Sep 17 00:00:00 2001 From: mame Date: Tue, 24 Jun 2008 13:16:44 +0000 Subject: * 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 --- vm_eval.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 7f01781d3b..8e4ddad2fd 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -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_env_t *env = NULL; rb_block_t block; + volatile int parse_in_eval; if (file == 0) { file = rb_sourcefile(); line = rb_sourceline(); } + parse_in_eval = th->parse_in_eval; PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { 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); } POP_TAG(); + th->parse_in_eval = parse_in_eval; if (state) { if (state == TAG_RAISE) { -- cgit v1.2.3