aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/ruby-lex.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 710396c4bc..891bbcd600 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 17 20:31:08 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/irb/ruby-lex.rb (identify_identifier): allow multibyte character
+ as identifier. [ruby-core:27275]
+
Sat Apr 17 09:19:27 2010 wanabe <s.wanabe@gmail.com>
* compile.c (iseq_compile_each): fix splat condition in NODE_WHEN.
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