* parse.y (parser_yylex): disallow non digits '0o' expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70b55c5dcf
commit
6c76a2577a
@ -1,3 +1,7 @@
|
|||||||
|
Tue Mar 4 16:29:06 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (parser_yylex): disallow non digits '0o' expression.
|
||||||
|
|
||||||
Tue Mar 04 14:35:12 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Tue Mar 04 14:35:12 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (open_key_args): use rb_io_open_with_args instead of rb_f_open.
|
* io.c (open_key_args): use rb_io_open_with_args instead of rb_f_open.
|
||||||
|
2
parse.y
2
parse.y
@ -6634,7 +6634,7 @@ parser_yylex(struct parser_params *parser)
|
|||||||
if (c == 'o' || c == 'O') {
|
if (c == 'o' || c == 'O') {
|
||||||
/* prefixed octal */
|
/* prefixed octal */
|
||||||
c = nextc();
|
c = nextc();
|
||||||
if (c == '_') {
|
if (c == '_' || !ISDIGIT(c)) {
|
||||||
yyerror("numeric literal without digits");
|
yyerror("numeric literal without digits");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user