diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-03 05:23:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-03 05:23:56 +0000 |
commit | 81567892d0695b095829e3c45cada221fb083cd2 (patch) | |
tree | 8cf2de85f9cf37387be30d5fd9a980a6a264c165 /lib/irb | |
parent | 4ec86dcc5761a3eaca546ffe121c9d03d7e1e0cd (diff) | |
download | ruby-81567892d0695b095829e3c45cada221fb083cd2.tar.gz |
* 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
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/ruby-lex.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 9befc5471e..30fecf7033 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -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 |