summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 02b75b4410..f32dafebf1 100644
--- a/parse.y
+++ b/parse.y
@@ -3491,6 +3491,10 @@ yylex()
yylval.val = rb_cstr_to_inum(tok(), 8, Qfalse);
return tINTEGER;
}
+ if (nondigit) {
+ pushback(c);
+ goto trailing_uc;
+ }
}
if (c > '7' && c <= '9') {
yyerror("Illegal octal digit");