diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -8547,11 +8547,17 @@ parse_percent(struct parser_params *p, const int space_seen, const enum lex_stat quotation: if (c == -1 || !ISALNUM(c)) { term = c; + if (!ISASCII(c)) goto unknown; c = 'Q'; } else { term = nextc(p); if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) { + unknown: + pushback(p, term); + c = parser_precise_mbclen(p, p->lex.pcur); + if (c < 0) return 0; + p->lex.pcur += c; yyerror0("unknown type of %string"); return 0; } |