summaryrefslogtreecommitdiff
path: root/tool/transcode-tblgen.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 00:53:13 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 00:53:13 +0000
commit375fd3152f21feeb3e3cf2b02449c3a495b349a9 (patch)
tree50c0d33a9702479e2a934eae7b65d25bbbec9338 /tool/transcode-tblgen.rb
parentf5d724ab19eb2b83f54331b55fed8d867836c0ed (diff)
* tool/transcode-tblgen.rb (import_ucm): don't use \h because the
script should work with ruby 1.8. * tool/enc-unicode.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rwxr-xr-xtool/transcode-tblgen.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index dc1f6ea911..b25901d375 100755
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -753,13 +753,13 @@ def import_ucm(path)
from_ucs = []
File.foreach(File.join($srcdir, "ucm", path)) do |line|
uc, bs, fb = nil
- if /^<U(\h+)>\s*([\+\hx\\]+)\s*\|(\d)/ =~ line
+ if /^<U([0-9a-fA-F]+)>\s*([\+0-9a-fA-Fx\\]+)\s*\|(\d)/ =~ line
uc = $1.hex
bs = $2.delete('x\\')
fb = $3.to_i
next if uc < 128 && uc == bs.hex
- elsif /^([<U\h>+]+)\s*([\+\hx\\]+)\s*\|(\d)/ =~ line
- uc = $1.scan(/\h+>/).map(&:hex).pack("U*").unpack("H*")[0]
+ elsif /^([<U0-9a-fA-F>+]+)\s*([\+0-9a-fA-Fx\\]+)\s*\|(\d)/ =~ line
+ uc = $1.scan(/[0-9a-fA-F]+>/).map(&:hex).pack("U*").unpack("H*")[0]
bs = $2.delete('x\\')
fb = $3.to_i
end