ruby-changes:6802
From: nobu <ko1@a...>
Date: Sat, 2 Aug 2008 15:52:08 +0900 (JST)
Subject: [ruby-changes:6802] Ruby:r18318 (ruby_1_8, trunk): * parse.y (yylex): 8 and 9 in octal integer should cause compile
nobu 2008-08-02 15:51:53 +0900 (Sat, 02 Aug 2008) New Revision: 18318 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18318 Log: * parse.y (yylex): 8 and 9 in octal integer should cause compile error. [ruby-dev:35729] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/parse.y trunk/ChangeLog trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 18317) +++ ChangeLog (revision 18318) @@ -1,3 +1,8 @@ +Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada <nobu@r...> + + * 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@r...> * enc/trans/japanese.c: add U+FF5E to EUC-JP. Index: parse.y =================================================================== --- parse.y (revision 18317) +++ parse.y (revision 18318) @@ -6656,7 +6656,8 @@ 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 @@ } } if (c > '7' && c <= '9') { + invalid_octal: yyerror("Invalid octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { Index: ruby_1_8/parse.y =================================================================== --- ruby_1_8/parse.y (revision 18317) +++ ruby_1_8/parse.y (revision 18318) @@ -3969,7 +3969,8 @@ 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); @@ -3986,6 +3987,7 @@ } } if (c > '7' && c <= '9') { + invalid_octal: yyerror("Illegal octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 18317) +++ ruby_1_8/ChangeLog (revision 18318) @@ -1,3 +1,8 @@ +Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada <nobu@r...> + + * parse.y (yylex): 8 and 9 in octal integer should cause compile + error. [ruby-dev:35729] + Sat Aug 2 11:51:42 2008 Nobuyoshi Nakada <nobu@r...> * rubysig.h (CHECK_INTS): gives the chance to perform to deferred -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/