* lib/irb/ruby-lex.rb (identify_identifier): add '_' to the regexp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-04-17 17:15:20 +00:00
Родитель 580677a984
Коммит fd734e6cc6
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Sun Apr 18 02:13:59 2010 NARUSE, Yui <naruse@ruby-lang.org>
* lib/irb/ruby-lex.rb (identify_identifier): add '_' to the regexp.
Sat Apr 17 23:21:15 2010 NARUSE, Yui <naruse@ruby-lang.org> Sat Apr 17 23:21:15 2010 NARUSE, Yui <naruse@ruby-lang.org>
* configure.in: use AC_TRY_LINK instead of AC_TRY_COMPILE. * configure.in: use AC_TRY_LINK instead of AC_TRY_COMPILE.

Просмотреть файл

@ -727,7 +727,7 @@ class RubyLex
printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug? printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug?
if peek(0) =~ /[0-9]/ if peek(0) =~ /[0-9]/
t = identify_number t = identify_number
elsif peek(0) =~ /[^\x00-\/:-@\[-`{-\x7F]/ elsif peek(0) =~ /[^\x00-\/:-@\[-^`{-\x7F]/
t = identify_identifier t = identify_identifier
end end
printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug? printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug?
@ -770,7 +770,7 @@ class RubyLex
end end
end end
while (ch = getc) =~ /[^\x00-\/:-@\[-`{-\x7F]/ while (ch = getc) =~ /[^\x00-\/:-@\[-^`{-\x7F]/
print ":", ch, ":" if RubyLex.debug? print ":", ch, ":" if RubyLex.debug?
token.concat ch token.concat ch
end end