1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/irb/ruby-lex.rb (RubyLex::identify_number): should not treat

plain zero as an octal number.  [ruby-dev:26410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2005-06-30 08:31:38 +00:00
parent 5f97451ef9
commit 4ffab87134
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu Jun 30 17:28:10 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/irb/ruby-lex.rb (RubyLex::identify_number): should not treat
plain zero as an octal number. [ruby-dev:26410]
Thu Jun 30 15:13:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_eval): pre-evaluate argument for unambiguous

View file

@ -936,6 +936,8 @@ class RubyLex
@lex_state = EXPR_END
if peek(0) == "0" && peek(1) !~ /[.eE]/
len0 = true
non_digit = false
getc
if /[xX]/ =~ peek(0)
ch = getc
@ -948,10 +950,9 @@ class RubyLex
match = /[0-7_]/
else
match = /[0-7_]/
len0 = false
end
len0 = true
non_digit = false
while ch = getc
if match =~ ch
if ch == "_"