resolve conflict; ref #3279

This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-11-25 09:33:20 +09:00
3 changed files with 14 additions and 2 deletions
+5 -1
View File
@@ -2295,7 +2295,11 @@ codegen(codegen_scope *s, node *tree, int val)
if (val) {
node *n = tree;
if (!n) break;
if (!n) {
genop(s, MKOP_A(OP_LOADNIL, cursp()));
push();
break;
}
codegen(s, n->car, VAL);
n = n->cdr;
while (n) {
+1 -1
View File
@@ -6541,7 +6541,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
case NODE_HEREDOC:
printf("NODE_HEREDOC (<<%s):\n", ((parser_heredoc_info*)tree)->term);
mrb_parser_dump(mrb, ((parser_heredoc_info*)tree)->doc, offset+1);
dump_recur(mrb, ((parser_heredoc_info*)tree)->doc, offset+1);
break;
default:
+8
View File
@@ -46,3 +46,11 @@ assert('method call with exactly 127 arguments') do
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
)
end
assert('nested empty heredoc') do
_, a = nil, <<B
#{<<A}
A
B
assert_equal "\n", a
end