зеркало из https://github.com/github/ruby.git
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:
Родитель
32b7457fa4
Коммит
2d5b57d63c
|
@ -264,7 +264,6 @@ class CaseMapping
|
|||
from = Array(from).map {|i| "%04X" % i}.join(" ")
|
||||
to = Array(to).map {|i| "%04X" % i}.join(" ")
|
||||
item = map(from)
|
||||
specials_index = nil
|
||||
specials = []
|
||||
case type
|
||||
when 'CaseFold_11'
|
||||
|
@ -309,7 +308,7 @@ class CaseMapping
|
|||
end
|
||||
unless item.upper == 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]
|
||||
flags += '|ST'
|
||||
else
|
||||
|
@ -410,8 +409,8 @@ if $0 == __FILE__
|
|||
s = f.string
|
||||
end
|
||||
if dest
|
||||
open(dest, "wb") do |f|
|
||||
f.print(s)
|
||||
open(dest, "wb") do |file|
|
||||
file.print(s)
|
||||
end
|
||||
else
|
||||
STDOUT.print(s)
|
||||
|
|
Загрузка…
Ссылка в новой задаче