mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue