aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--enc/unicode.c4
-rwxr-xr-xenc/unicode/case-folding.rb10
-rw-r--r--test/ruby/enc/test_case_comprehensive.rb2
3 files changed, 8 insertions, 8 deletions
diff --git a/enc/unicode.c b/enc/unicode.c
index e72b2e64b2..cf77492781 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -777,8 +777,8 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
code = folded->code[0];
}
else if ((flags&(ONIGENC_CASE_UPCASE))
- && (code==0x03B9||code==0x03BC)) { /* GREEK SMALL LETTERs IOTA/MU */
- MODIFIED;
+ && (code==0x03B9||code==0x03BC||code==0xA64B)) { /* GREEK SMALL LETTERs IOTA/MU, */
+ MODIFIED; /* CYRILLIC SMALL LETTER MONOGRAPH UK */
code = folded->code[1];
}
}
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index ef97baf737..e94b582a02 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -296,17 +296,19 @@ class CaseMapping
when item.upper then flags += '|U'
when item.lower then flags += '|D'
else
- unless from=='03B9' or from=='03BC'
- warn 'Unpredicted case 0; check data or adjust program (enc/unicode/case_folding.rb).'
+ unless from=='03B9' or from=='03BC' or from=='A64B'
+ # cf. code==0x03B9||code==0x03BC||code==0xA64B in enc/unicode.c,
+ # towards the end of function onigenc_unicode_case_map
+ raise "Unpredicted case 0 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
end
end
unless item.upper == item.title
if item.code == item.title
- warn 'Unpredicted case 1; check data or adjust program (enc/unicode/case_folding.rb).'
+ raise "Unpredicted case 1 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
elsif item.title==to[1]
flags += '|ST'
else
- warn 'Unpredicted case 2; check data or adjust program (enc/unicode/case_folding.rb).'
+ raise "Unpredicted case 2 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
end
end
end
diff --git a/test/ruby/enc/test_case_comprehensive.rb b/test/ruby/enc/test_case_comprehensive.rb
index 2ee24f86c9..f0313d2b89 100644
--- a/test/ruby/enc/test_case_comprehensive.rb
+++ b/test/ruby/enc/test_case_comprehensive.rb
@@ -146,8 +146,6 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase
attributes.prepend '_' unless attributes.empty?
define_method "test_#{encoding}_#{test.method_name}#{attributes}" do
@@codepoints.each do |code|
- next if code=="\uA64B" # temporarily exclude this character from testing,
- # see https://bugs.ruby-lang.org/issues/12990
source = code.encode(encoding) * 5
target = "#{test.first_data[code]}#{test.follow_data[code]*4}".encode(encoding)
result = source.__send__(test.method_name, *test.attributes)