summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-10 10:06:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-10 10:06:12 +0000
commit31de74167305fd4b3850d4cbc39c6e20b5468f4e (patch)
treeda845161834c93006e9cc919b54e85cf892e3d92 /parse.y
parentabca067fb6d572ee45c585a43dbdfc153ce9f14f (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 02b75b4410..f32dafebf1 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");