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 | a9fa5f5a15d191bb2660da6be5ef898191c536d3 (patch) | |
tree | e8f247ce5addbebee136ef25b14b1537ba956018 /lib/irb | |
parent | 4b6e478ca6d653f6b5d9cb3b5f321ca9bbf33e0d (diff) |
* 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/branches/ruby_1_8@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 == "_" |