diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-06 06:29:41 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-06 06:29:41 -0700 |
| commit | 8a38347410bdc3038dfd14fc0eddec8ae3e0fb3e (patch) | |
| tree | 17247c8beecdc7a4799dd555990cd9485079a237 | |
| parent | aa9a3380ee2bc3cb60e2988849888a963244f407 (diff) | |
| parent | a258d5752a01255572cbf603f223aba70442d981 (diff) | |
| download | mruby-8a38347410bdc3038dfd14fc0eddec8ae3e0fb3e.tar.gz mruby-8a38347410bdc3038dfd14fc0eddec8ae3e0fb3e.zip | |
Merge pull request #1145 from h2so5/fix-mirb
Improve checking for unterminated string in mirb
| -rw-r--r-- | tools/mirb/mirb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c index ed3b105b6..ba400bf95 100644 --- a/tools/mirb/mirb.c +++ b/tools/mirb/mirb.c @@ -38,9 +38,6 @@ is_code_block_open(struct mrb_parser_state *parser) { int code_block_open = FALSE; - /* check for unterminated string */ - if (parser->lex_strterm) return TRUE; - /* check for heredoc */ if (parser->heredoc_starts_nextline) return TRUE; if (parser->heredoc_end_now) { @@ -70,6 +67,9 @@ is_code_block_open(struct mrb_parser_state *parser) return code_block_open; } + /* check for unterminated string */ + if (parser->lex_strterm) return TRUE; + switch (parser->lstate) { /* all states which need more code */ |
