diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-21 14:45:06 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-21 14:45:06 +0900 |
| commit | 438d114917af8b404c79fc94ec86f414a4ae6d60 (patch) | |
| tree | a12a29bad681d56b30b1c99a0b11aaa0276a16f2 /mrbgems/mruby-compiler/core/parse.y | |
| parent | 56fdc449ebc1b0a6bd67881fdafbc271b6d00330 (diff) | |
| download | mruby-438d114917af8b404c79fc94ec86f414a4ae6d60.tar.gz mruby-438d114917af8b404c79fc94ec86f414a4ae6d60.zip | |
Fix a bug that `:_1` to cause syntax error; fix #5295
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index e874a145a..53cd4ffad 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -6308,7 +6308,7 @@ parser_yylex(parser_state *p) break; case '_': - if (toklen(p) == 2 && ISDIGIT(tok(p)[1]) && p->nvars) { + if (p->lstate != EXPR_FNAME && toklen(p) == 2 && ISDIGIT(tok(p)[1]) && p->nvars) { int n = tok(p)[1] - '0'; int nvar; |
