summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-26 05:41:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-26 05:41:11 +0000
commit09c8c7b889ac52acbcdbebabfde149f452d55173 (patch)
treea931cca89275a54d5b165732f694f8ead8944608 /parse.y
parent62ab025322838f01093a290df0cc503bc82a6081 (diff)
* parse.y (block_append): update nd_end for "real" head node.
[ruby-list:39058] * eval.c (proc_eq): Proc with empty body may not be equal. [ruby-dev:22590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 1de67b58f6..a6c869f125 100644
--- a/parse.y
+++ b/parse.y
@@ -384,7 +384,7 @@ stmts : none
}
| stmts terms stmt
{
- $$ = block_append($1, newline_node($3));
+ $$ = block_append($1, $3);
}
| error stmt
{
@@ -4518,7 +4518,7 @@ block_append(head, tail)
parser_warning(h, "unused literal ignored");
return tail;
default:
- end = NEW_BLOCK(head);
+ h = end = NEW_BLOCK(head);
end->nd_end = end;
fixpos(end, head);
head = end;
@@ -4554,7 +4554,7 @@ block_append(head, tail)
tail->nd_end = tail;
}
end->nd_next = tail;
- head->nd_end = tail->nd_end;
+ h->nd_end = tail->nd_end;
return head;
}