summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mirb/mirb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c
index 29685cf28..e20de629d 100644
--- a/tools/mirb/mirb.c
+++ b/tools/mirb/mirb.c
@@ -40,6 +40,13 @@ is_code_block_open(struct mrb_parser_state *parser)
/* check for unterminated string */
if (parser->sterm) return TRUE;
+ /* check for heredoc */
+ if (parser->heredoc_starts_nextline) return TRUE;
+ if (parser->heredoc_end_now) {
+ parser->heredoc_end_now = FALSE;
+ return FALSE;
+ }
+
/* check if parser error are available */
if (0 < parser->nerr) {
const char *unexpected_end = "syntax error, unexpected $end";