summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-17 11:37:56 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-17 11:37:56 +0000
commit0b28bf2958497d0ec2d278bf251947c430190538 (patch)
tree6754158951e3c20ef8f8ef7cf05c33b003640063 /lib
parent94365e53450cbedcdb1eac8f9ba131f1cf6b5501 (diff)
* lib/irb/ruby-lex.rb (identify_identifier): allow multibyte character
as identifier. [ruby-core:27275] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/ruby-lex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 37261bb79c..846c5f24bb 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -727,7 +727,7 @@ class RubyLex
printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug?
if peek(0) =~ /[0-9]/
t = identify_number
- elsif peek(0) =~ /\w/
+ elsif peek(0) =~ /[^\x00-\/:-@\[-`{-\x7F]/
t = identify_identifier
end
printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug?
@@ -770,7 +770,7 @@ class RubyLex
end
end
- while (ch = getc) =~ /\w|_/
+ while (ch = getc) =~ /[^\x00-\/:-@\[-`{-\x7F]/
print ":", ch, ":" if RubyLex.debug?
token.concat ch
end