should not leave open code on syntax errors; close #413

This commit is contained in:
Yukihiro Matsumoto
2012-08-01 17:52:14 +09:00
parent d271bf0aa6
commit 1ff6dfd081
+2 -2
View File
@@ -50,10 +50,10 @@ is_code_block_open(struct mrb_parser_state *parser)
code_block_open = TRUE;
}
else if (strcmp(message, "syntax error, unexpected keyword_end") == 0) {
code_block_open = TRUE;
code_block_open = FALSE;
}
else if (strcmp(message, "syntax error, unexpected tREGEXP_BEG") == 0) {
code_block_open = TRUE;
code_block_open = FALSE;
}
return code_block_open;
}