prepare for Unicode 11.0.0 update
- enc/unicode/case-folding.rb: - Convert unpredicted case to actual flag setting - Eliminate an unused variable - Change a variable name to avoid a warning git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
32b7457fa4
commit
2d5b57d63c
@ -264,7 +264,6 @@ class CaseMapping
|
|||||||
from = Array(from).map {|i| "%04X" % i}.join(" ")
|
from = Array(from).map {|i| "%04X" % i}.join(" ")
|
||||||
to = Array(to).map {|i| "%04X" % i}.join(" ")
|
to = Array(to).map {|i| "%04X" % i}.join(" ")
|
||||||
item = map(from)
|
item = map(from)
|
||||||
specials_index = nil
|
|
||||||
specials = []
|
specials = []
|
||||||
case type
|
case type
|
||||||
when 'CaseFold_11'
|
when 'CaseFold_11'
|
||||||
@ -309,7 +308,7 @@ class CaseMapping
|
|||||||
end
|
end
|
||||||
unless item.upper == item.title
|
unless item.upper == item.title
|
||||||
if item.code == item.title
|
if item.code == item.title
|
||||||
raise "Unpredicted case 1 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
|
flags += '|IT' # was unpredicted case 1
|
||||||
elsif item.title==to[1]
|
elsif item.title==to[1]
|
||||||
flags += '|ST'
|
flags += '|ST'
|
||||||
else
|
else
|
||||||
@ -410,8 +409,8 @@ if $0 == __FILE__
|
|||||||
s = f.string
|
s = f.string
|
||||||
end
|
end
|
||||||
if dest
|
if dest
|
||||||
open(dest, "wb") do |f|
|
open(dest, "wb") do |file|
|
||||||
f.print(s)
|
file.print(s)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
STDOUT.print(s)
|
STDOUT.print(s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user