diff --git a/ChangeLog b/ChangeLog index 1fee2b14e0..cd2f2ae731 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Dec 12 16:23:18 2008 Nobuyoshi Nakada + + * 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) * encoding.c (enc_get_default_encoding): removed. diff --git a/parse.y b/parse.y index 72d1b1d31d..b462322339 100644 --- a/parse.y +++ b/parse.y @@ -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; }