summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/ruby-lex.rb5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0cd5180c85..08f219aaac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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 == "_"