summaryrefslogtreecommitdiff
path: root/enc/unicode/case-folding.rb
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 07:53:37 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-16 07:53:37 +0000
commita5818630f8f13ee1b52a45f9e3d14caf9c4b55c9 (patch)
treed162e4aac6204dc68a0ebfac3e693e6d5bb17bdf /enc/unicode/case-folding.rb
parent417fc484c38b0b54890625278a6c30a0e2f7503d (diff)
revert r65091, r65090 because ci fails
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/unicode/case-folding.rb')
-rwxr-xr-xenc/unicode/case-folding.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index c1deb4134b..829efefaf1 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -270,11 +270,11 @@ class CaseMapping
when 'CaseFold_11'
flags += '|F'
if item
- flags += '|U' if to==item.upper # ONIGENC_CASE_UPCASE
- flags += '|D' if to==item.lower # ONIGENC_CASE_DOWNCASE
+ flags += '|U' if to==item.upper
+ flags += '|D' if to==item.lower
unless item.upper == item.title
if item.code == item.title
- flags += '|IT' # ONIGENC_CASE_IS_TITLECASE
+ flags += '|IT'
swap = case item.code
when '01C5' then '0064 017D'
when '01C8' then '006C 004A'
@@ -285,33 +285,33 @@ class CaseMapping
end
specials << swap
else
- flags += '|ST' # ONIGENC_CASE_TITLECASE
+ flags += '|ST'
specials << item.title
end
end
unless item.lower.nil? or item.lower==from or item.lower==to
specials << item.lower
- flags += '|SL' # ONIGENC_CASE_DOWN_SPECIAL
+ flags += '|SL'
end
unless item.upper.nil? or item.upper==from or item.upper==to
specials << item.upper
- flags += '|SU' # ONIGENC_CASE_UP_SPECIAL
+ flags += '|SU'
end
end
when 'CaseUnfold_11'
to = to.split(/ /)
if item
case to.first
- when item.upper then flags += '|U' # ONIGENC_CASE_UPCASE
- when item.lower then flags += '|D' # ONIGENC_CASE_DOWNCASE
+ when item.upper then flags += '|U'
+ when item.lower then flags += '|D'
else
raise "Unpredicted case 0 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
end
unless item.upper == item.title
if item.code == item.title
- flags += '|IT' # was unpredicted case 1
+ raise "Unpredicted case 1 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
elsif item.title==to[1]
- flags += '|ST' # ONIGENC_CASE_TITLECASE
+ flags += '|ST'
else
raise "Unpredicted case 2 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
end