1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/enc-unicode.rb,

enc/unicode/name2ctype.h, enc/unicode/name2ctype.h.blt,
  enc/unicode/name2ctype.kwd, enc/unicode/name2ctype.src:
  Add 'Unknown' Script.
  patched by Run Paint Run Run. [ruby-core:32937] #3998

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-10-29 01:03:21 +00:00
parent 84b86f106f
commit f85b841a01
6 changed files with 2508 additions and 470 deletions

View file

@ -129,13 +129,13 @@ def parse_scripts(data)
]
current = nil
cps = []
names = []
names = {}
files.each do |file|
IO.foreach(get_file(file[:fn])) do |line|
if /^# Total code points: / =~ line
data[current] = cps
make_const(current, cps, file[:title])
names << current
(names[file[:title]] ||= []) << current
cps = []
elsif /^(\h+)(?:..(\h+))?\s*;\s*(\w+)/ =~ line
current = $3
@ -143,7 +143,11 @@ def parse_scripts(data)
end
end
end
names
# All code points not explicitly listed for Script
# have the value Unknown (Zzzz).
data['Unknown'] = (0..0x10ffff).to_a - data.values_at(*names['Script']).flatten
make_const('Unknown', data['Unknown'], 'Script')
names.values.flatten << 'Unknown'
end
def parse_aliases(data)