mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/irb/ruby-lex.rb (RubyLex#identify_string): use charclass.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ec86dcc57
commit
81567892d0
1 changed files with 3 additions and 3 deletions
|
@ -148,7 +148,7 @@ class RubyLex
|
|||
end
|
||||
c = c2 unless c
|
||||
@rests.unshift c #c =
|
||||
@seek -= 1
|
||||
@seek -= 1
|
||||
if c == "\n"
|
||||
@line_no -= 1
|
||||
if idx = @readed.reverse.index("\n")
|
||||
|
@ -239,7 +239,7 @@ class RubyLex
|
|||
end
|
||||
end
|
||||
if @line != "\n"
|
||||
@line.force_encoding(@io.encoding)
|
||||
@line.force_encoding(@io.encoding)
|
||||
yield @line, @exp_line_no
|
||||
end
|
||||
break unless l
|
||||
|
@ -1068,7 +1068,7 @@ class RubyLex
|
|||
end
|
||||
end
|
||||
if @ltype == "/"
|
||||
while peek(0) =~ /i|m|x|o|e|s|u|n/
|
||||
while /[imxoesun]/ =~ peek(0)
|
||||
getc
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue