summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 07:29:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 07:29:38 +0000
commit78e8d67af165b6e031ed14c870b007db3515cb02 (patch)
tree5ccc1600778e4a0bfe588fe396dad6fdc3aeb865 /parse.y
parent6b5e05d79251940aab2767d6ac22693205966a0d (diff)
downloadruby-78e8d67af165b6e031ed14c870b007db3515cb02.tar.gz
ruby-78e8d67af165b6e031ed14c870b007db3515cb02.tar.xz
ruby-78e8d67af165b6e031ed14c870b007db3515cb02.zip
* parse.y (parser_yylex): disallow non digits '0o' expression.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 88e72de4b..e1c047029 100644
--- a/parse.y
+++ b/parse.y
@@ -6634,7 +6634,7 @@ parser_yylex(struct parser_params *parser)
if (c == 'o' || c == 'O') {
/* prefixed octal */
c = nextc();
- if (c == '_') {
+ if (c == '_' || !ISDIGIT(c)) {
yyerror("numeric literal without digits");
}
}