parse.y: `class` cannot be followed by modifier `if`. [ruby-bugs:18884]
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -6514,7 +6514,7 @@ parser_yylex(parser_state *p)
return keyword_do_block;
return keyword_do;
}
- if (state == EXPR_BEG || state == EXPR_VALUE)
+ if (state == EXPR_BEG || state == EXPR_VALUE || state == EXPR_CLASS)
return kw->id[0];
else {
if (kw->id[0] != kw->id[1])

MODIFY
mrbgems/mruby-compiler/core/y.tab.c
mrbgems/mruby-compiler/core/y.tab.c
@@ -12753,7 +12753,7 @@ parser_yylex(parser_state *p)
return keyword_do_block;
return keyword_do;
}
- if (state == EXPR_BEG || state == EXPR_VALUE)
+ if (state == EXPR_BEG || state == EXPR_VALUE || state == EXPR_CLASS)
return kw->id[0];
else {
if (kw->id[0] != kw->id[1])

parse.y: `class` cannot be followed by modifier `if`. [ruby-bugs:18884]