From 1132d84b00ad971e588dfa80efd6a8bd1d3471ca Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 10 Jun 2002 10:06:12 +0000 Subject: * numeric.c (fix_lshift): negative shift count means right shift. * numeric.c (fix_rshift): return -1 when left side operand is negative. * parse.y (yylex): `0_' should be an error. (ruby-bugs-ja:PR#239) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 02b75b441..f32dafebf 100644 --- a/parse.y +++ b/parse.y @@ -3491,6 +3491,10 @@ yylex() yylval.val = rb_cstr_to_inum(tok(), 8, Qfalse); return tINTEGER; } + if (nondigit) { + pushback(c); + goto trailing_uc; + } } if (c > '7' && c <= '9') { yyerror("Illegal octal digit"); -- cgit