summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-16 06:50:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-16 06:50:43 +0000
commitb3d2d91de852846121ead8f46f5f517061c56c92 (patch)
treea505aa178c442167b0e82f9d21371fc3a6408d1e /eval.c
parent9a2db62124c6d10e660d9301963f2c6d936d9b60 (diff)
* eval.c (rb_eval): untangled ruby_dyna_vars. [ruby-talk:59035]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index d8a9dc1a1f..501fb3a4e3 100644
--- a/eval.c
+++ b/eval.c
@@ -2901,6 +2901,7 @@ rb_eval(self, n)
NODE *list = node->nd_next;
str = rb_str_new3(node->nd_lit);
+ if (!ruby_dyna_vars) rb_dvar_push(0, 0);
while (list) {
if (list->nd_head) {
switch (nd_type(list->nd_head)) {
@@ -2912,7 +2913,6 @@ rb_eval(self, n)
ruby_errinfo = Qnil;
ruby_sourceline = nd_line(list->nd_head);
ruby_in_eval++;
- if (!ruby_dyna_vars) rb_dvar_push(0, 0);
list->nd_head = compile(list->nd_head->nd_lit,
ruby_sourcefile,
ruby_sourceline);
@@ -2920,8 +2920,8 @@ rb_eval(self, n)
NODE *body = (NODE *)ruby_scope->scope_node;
if (body && body->nd_tbl != ruby_scope->local_tbl) {
if (body->nd_tbl) free(body->nd_tbl);
- ruby_scope->local_vars[-1] = (VALUE)body;
- body->nd_tbl = ruby_scope->local_tbl;
+ ruby_scope->local_vars[-1] = (VALUE)body;
+ body->nd_tbl = ruby_scope->local_tbl;
}
}
ruby_eval_tree = 0;