diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-06 00:03:06 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-06 00:03:06 +0000 |
commit | 73a8afe6743dcdb6fadbc03cbef5ff99131bcba2 (patch) | |
tree | c7f22eacdbab9a065db34ab4896999d7c7651486 /parse.y | |
parent | e067a32f6256bd1e3e41d03918b828c72ecd607b (diff) |
merge revision(s) 18318:
* 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/branches/ruby_1_8_6@21349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3903,7 +3903,8 @@ yylex() 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); @@ -3920,6 +3921,7 @@ yylex() } } if (c > '7' && c <= '9') { + invalid_octal: yyerror("Illegal octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { |