mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (yylex): 8 and 9 in octal integer should cause compile
error. [ruby-dev:35729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4de6475690
commit
b951952b40
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (yylex): 8 and 9 in octal integer should cause compile
|
||||
error. [ruby-dev:35729]
|
||||
|
||||
Sat Aug 2 01:06:10 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* enc/trans/japanese.c: add U+FF5E to EUC-JP.
|
||||
|
|
4
parse.y
4
parse.y
|
@ -6656,7 +6656,8 @@ parser_yylex(struct parser_params *parser)
|
|||
nondigit = c;
|
||||
continue;
|
||||
}
|
||||
if (c < '0' || c > '7') break;
|
||||
if (c < '0' || c > '9') break;
|
||||
if (c > '7') goto invalid_octal;
|
||||
nondigit = 0;
|
||||
tokadd(c);
|
||||
} while ((c = nextc()) != -1);
|
||||
|
@ -6673,6 +6674,7 @@ parser_yylex(struct parser_params *parser)
|
|||
}
|
||||
}
|
||||
if (c > '7' && c <= '9') {
|
||||
invalid_octal:
|
||||
yyerror("Invalid octal digit");
|
||||
}
|
||||
else if (c == '.' || c == 'e' || c == 'E') {
|
||||
|
|
Loading…
Reference in a new issue