* 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
@ -148,7 +148,7 @@ class RubyLex
|
|||||||
end
|
end
|
||||||
c = c2 unless c
|
c = c2 unless c
|
||||||
@rests.unshift c #c =
|
@rests.unshift c #c =
|
||||||
@seek -= 1
|
@seek -= 1
|
||||||
if c == "\n"
|
if c == "\n"
|
||||||
@line_no -= 1
|
@line_no -= 1
|
||||||
if idx = @readed.reverse.index("\n")
|
if idx = @readed.reverse.index("\n")
|
||||||
@ -239,7 +239,7 @@ class RubyLex
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if @line != "\n"
|
if @line != "\n"
|
||||||
@line.force_encoding(@io.encoding)
|
@line.force_encoding(@io.encoding)
|
||||||
yield @line, @exp_line_no
|
yield @line, @exp_line_no
|
||||||
end
|
end
|
||||||
break unless l
|
break unless l
|
||||||
@ -1068,7 +1068,7 @@ class RubyLex
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if @ltype == "/"
|
if @ltype == "/"
|
||||||
while peek(0) =~ /i|m|x|o|e|s|u|n/
|
while /[imxoesun]/ =~ peek(0)
|
||||||
getc
|
getc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user