1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (yycompile0): ruby_eval_tree_begin is always 0 when

ruby_eval_tree is 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-12-12 07:23:24 +00:00
parent aa06e69000
commit 303c28d49b
2 changed files with 7 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Fri Dec 12 16:23:18 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (yycompile0): ruby_eval_tree_begin is always 0 when
ruby_eval_tree is 0.
Fri Dec 12 14:09:55 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* encoding.c (enc_get_default_encoding): removed.

12
parse.y
View file

@ -5015,16 +5015,8 @@ yycompile0(VALUE arg, int tracing)
if (!tree) {
tree = NEW_NIL();
}
if (ruby_eval_tree_begin) {
NODE *scope = ruby_eval_tree;
if (scope) {
scope->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, scope->nd_body);
}
tree = scope;
}
else {
tree = ruby_eval_tree;
else if (ruby_eval_tree_begin) {
tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
}
return (VALUE)tree;
}