diff options
Diffstat (limited to 'lib/irb/ruby-lex.rb')
-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 == "_" |