Fixed a bug in `mirb` heredoc handling; fix #3989

parent f1eeaad8
......@@ -143,7 +143,6 @@ struct mrb_parser_state {
mrb_ast_node *heredocs_from_nextline;
mrb_ast_node *parsing_heredoc;
mrb_ast_node *lex_strterm_before_heredoc;
mrb_bool heredoc_end_now:1; /* for mirb */
void *ylval;
......
......@@ -126,10 +126,6 @@ is_code_block_open(struct mrb_parser_state *parser)
/* check for heredoc */
if (parser->parsing_heredoc != NULL) return TRUE;
if (parser->heredoc_end_now) {
parser->heredoc_end_now = FALSE;
return FALSE;
}
/* check for unterminated string */
if (parser->lex_strterm) return TRUE;
......
......@@ -1078,7 +1078,6 @@ heredoc_end(parser_state *p)
end_strterm(p);
p->lex_strterm = p->lex_strterm_before_heredoc;
p->lex_strterm_before_heredoc = NULL;
p->heredoc_end_now = TRUE;
}
else {
/* next heredoc */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment