summaryrefslogtreecommitdiff
path: root/enc/unicode/case-folding.rb
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-23 06:45:26 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-23 06:45:26 +0000
commit2d5b57d63c235ec5bd0814552b20eb00604b5f65 (patch)
tree7f6b9e9bbbc107a0d33b954ad9e9f201dff13913 /enc/unicode/case-folding.rb
parent32b7457fa4d19eb17f073a457bba21c8a5b9a316 (diff)
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
Diffstat (limited to 'enc/unicode/case-folding.rb')
-rwxr-xr-xenc/unicode/case-folding.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index 829efefaf1..362d6ebfd9 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -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)