aboutsummaryrefslogtreecommitdiffstats
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
commit6c76a2577ab2ae9ecaf846a908be4b35206b3d69 (patch)
tree5ccc1600778e4a0bfe588fe396dad6fdc3aeb865
parent70b55c5dcfb237ebab92523bba66cd4c3a25f944 (diff)
downloadruby-6c76a2577ab2ae9ecaf846a908be4b35206b3d69.tar.gz
* 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
-rw-r--r--ChangeLog4
-rw-r--r--parse.y2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 869796b35f..a7f4de32a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* io.c (open_key_args): use rb_io_open_with_args instead of rb_f_open.
diff --git a/parse.y b/parse.y
index 88e72de4bf..e1c047029b 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");
}
}