From 375fd3152f21feeb3e3cf2b02449c3a495b349a9 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 17 Feb 2012 00:53:13 +0000 Subject: * 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 --- tool/transcode-tblgen.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tool/transcode-tblgen.rb') 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 /^\s*([\+\hx\\]+)\s*\|(\d)/ =~ line + if /^\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 /^([+]+)\s*([\+\hx\\]+)\s*\|(\d)/ =~ line - uc = $1.scan(/\h+>/).map(&:hex).pack("U*").unpack("H*")[0] + elsif /^([+]+)\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 -- cgit v1.2.3