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

* parse.y (rb_parser_append_print, rb_parser_while_loop): body node

can be empty.  [ruby-dev:24628]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-10-29 02:35:11 +00:00
parent e954bfb6ef
commit 1b66559c66
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Fri Oct 29 11:35:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (rb_parser_append_print, rb_parser_while_loop): body node
can be empty. [ruby-dev:24628]
Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (ruby_cleanup): ruby_finalize_1 may cause exception,

10
parse.y
View file

@ -7771,9 +7771,10 @@ NODE*
rb_parser_append_print(node)
NODE *node;
{
NODE *prelude = (nd_type(node) == NODE_PRELUDE) ? node : 0;
NODE *prelude = 0;
if (prelude) {
if (node && (nd_type(node) == NODE_PRELUDE)) {
prelude = node;
node = node->nd_body;
}
node = block_append(node,
@ -7791,9 +7792,10 @@ rb_parser_while_loop(node, chop, split)
NODE *node;
int chop, split;
{
NODE *prelude = (nd_type(node) == NODE_PRELUDE) ? node : 0;
NODE *prelude = 0;
if (prelude) {
if (node && (nd_type(node) == NODE_PRELUDE)) {
prelude = node;
node = node->nd_body;
}
if (split) {