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

* remove trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2014-10-06 01:27:43 +00:00
parent 33447b80d5
commit cc8a255d25

View file

@ -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