summaryrefslogtreecommitdiffstats
path: root/lib/irb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-30 08:31:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-30 08:31:38 +0000
commitb3ac6f1ba5a65ca4f523a31c7c782c044846cbfd (patch)
tree53c5d7675216f28b3b4bc6048a7591bd564205f9 /lib/irb
parent39095d4c02f4e2222186d30995dea18aef304720 (diff)
downloadruby-b3ac6f1ba5a65ca4f523a31c7c782c044846cbfd.tar.gz
ruby-b3ac6f1ba5a65ca4f523a31c7c782c044846cbfd.tar.xz
ruby-b3ac6f1ba5a65ca4f523a31c7c782c044846cbfd.zip
* lib/irb/ruby-lex.rb (RubyLex::identify_number): should not treat
plain zero as an octal number. [ruby-dev:26410] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/ruby-lex.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 4c51afbc2..4b7ad6a0b 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 == "_"