diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-30 08:31:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-30 08:31:38 +0000 |
commit | 4ffab8713438fafb118776fcc1807b0c01e70be8 (patch) | |
tree | 53c5d7675216f28b3b4bc6048a7591bd564205f9 /lib/irb | |
parent | 5f97451ef98ed12e9793d6d5c54d245ed41e241f (diff) | |
download | ruby-4ffab8713438fafb118776fcc1807b0c01e70be8.tar.gz |
* 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
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/ruby-lex.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 4c51afbc28..4b7ad6a0bf 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -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 == "_" |