From 143ce7f7eee59116e4e23015cf469a899572c6fb Mon Sep 17 00:00:00 2001 From: duerst Date: Wed, 30 Nov 2016 08:25:46 +0000 Subject: fix uppercasing for U+A64B, CYRILLIC SMALL LETTER MONOGRAPH UK * enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC at the end of onigenc_unicode_case_map (Bug #12990). * enc/unicode/case-folding.rb: Add U+A64B to the special cases 03B9 and 03BC. Add a comment pointing to enc/unicode.c. Change warnings to exceptions for unpredicted cases, because this would have been more easily noticed (the warning was not noticed when upgrading to Unicode 9.0.0). * test/ruby/enc/test_case_comprehensive.rb: Remove temporary exclusion of U+A64B from testing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enc/unicode/case-folding.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'enc/unicode') 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 -- cgit v1.2.3