diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-24 07:20:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-24 07:20:42 +0000 |
commit | 33061b45b4555de324b63c53a7151cc5ad599384 (patch) | |
tree | dd0fc8bd441ae6ac82925bfd71fba7c955186f73 /eval.c | |
parent | 0e866a2e516d5b7bea0a602d1048b5bdc22a2f98 (diff) |
* eval.c (rb_eval): NODE_EVSTR is no longer used.
* eval.c (eval): not enforce to make assigned variables dynamic.
* parse.y (string): split rules to strings/xstring/regexp to allow
arbitrary statements inside string interpolation.
* parse.y (here_document): splitted into three phases.
* parse.y (literall_append, literal_concat): added.
append/concatinate string literals.
* sample/test.rb (valid_syntax): adjust line number for BEGIN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -3068,29 +3068,14 @@ 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)) { case NODE_STR: str2 = list->nd_head->nd_lit; break; - case NODE_EVSTR: - result = ruby_errinfo; - ruby_errinfo = Qnil; - ruby_sourceline = nd_line(node); - ruby_in_eval++; - list->nd_head = compile(list->nd_head->nd_lit, - ruby_sourcefile, - ruby_sourceline); - ruby_eval_tree = 0; - ruby_in_eval--; - if (ruby_nerrs > 0) { - compile_error("string expansion"); - } - if (!NIL_P(result)) ruby_errinfo = result; - /* fall through */ default: + ruby_sourceline = nd_line(list->nd_head); str2 = rb_obj_as_string(rb_eval(self, list->nd_head)); break; } @@ -5025,7 +5010,6 @@ eval(self, src, scope, file, line) if (ruby_frame->prev) { ruby_frame->iter = ruby_frame->prev->iter; } - if (!ruby_dyna_vars) rb_dvar_push(0, 0); } if (file == 0) { file = ruby_sourcefile; |