* 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:
parent
5f97451ef9
commit
4ffab87134
@ -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>
|
Thu Jun 30 15:13:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_eval): pre-evaluate argument for unambiguous
|
* eval.c (rb_eval): pre-evaluate argument for unambiguous
|
||||||
|
@ -936,6 +936,8 @@ class RubyLex
|
|||||||
@lex_state = EXPR_END
|
@lex_state = EXPR_END
|
||||||
|
|
||||||
if peek(0) == "0" && peek(1) !~ /[.eE]/
|
if peek(0) == "0" && peek(1) !~ /[.eE]/
|
||||||
|
len0 = true
|
||||||
|
non_digit = false
|
||||||
getc
|
getc
|
||||||
if /[xX]/ =~ peek(0)
|
if /[xX]/ =~ peek(0)
|
||||||
ch = getc
|
ch = getc
|
||||||
@ -948,10 +950,9 @@ class RubyLex
|
|||||||
match = /[0-7_]/
|
match = /[0-7_]/
|
||||||
else
|
else
|
||||||
match = /[0-7_]/
|
match = /[0-7_]/
|
||||||
|
len0 = false
|
||||||
end
|
end
|
||||||
|
|
||||||
len0 = true
|
|
||||||
non_digit = false
|
|
||||||
while ch = getc
|
while ch = getc
|
||||||
if match =~ ch
|
if match =~ ch
|
||||||
if ch == "_"
|
if ch == "_"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user