aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorsvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-06 01:27:43 +0000
committersvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-06 01:27:43 +0000
commitcc8a255d256d3007bf7b43e7368fd7d853891979 (patch)
treecb6bef51c78ffc9318c093a6f50df53007473925 /tool
parent33447b80d52f395b26c31a907648503129b1d077 (diff)
downloadruby-cc8a255d256d3007bf7b43e7368fd7d853891979.tar.gz
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/unicode_norm_gen.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/unicode_norm_gen.rb b/tool/unicode_norm_gen.rb
index 90eba75f3a..d1be12e50a 100644
--- a/tool/unicode_norm_gen.rb
+++ b/tool/unicode_norm_gen.rb
@@ -20,9 +20,9 @@ class Array
def line_slice (new_line) # joins items, 16 items per line
each_slice(16).collect(&:join).join new_line
end
-
+
def to_UTF8() collect(&:to_UTF8).join end
-
+
def to_regexp_chars # converts an array of Integers to character ranges
sort.inject([]) do |ranges, value|
if ranges.last and ranges.last[1]+1>=value
@@ -64,7 +64,7 @@ CombiningClass = {} # constant to allow use in Integer#to_UTF8
# read the file 'UnicodeData.txt'
IO.foreach("../data/UnicodeData.txt") do |line|
codepoint, name, _2, char_class, _4, decomposition, *_rest = line.split(";")
-
+
case decomposition
when /^[0-9A-F]/
decomposition_table[codepoint.hex] = decomposition.split(' ').collect(&:hex)
@@ -72,7 +72,7 @@ IO.foreach("../data/UnicodeData.txt") do |line|
kompatible_table[codepoint.hex] = decomposition.split(' ').drop(1).collect(&:hex)
end
CombiningClass[codepoint.hex] = char_class.to_i if char_class != "0"
-
+
if name=~/(First|Last)>$/ and (char_class!="0" or decomposition!="")
warn "Unexpected: Character range with data relevant to normalization!"
end