diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-04 01:58:54 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-04 01:58:54 +0000 |
commit | 64f7deb0cb8c5e57d253d491deef82b60327e60e (patch) | |
tree | b7c99c86d4162a38c9b9c35cec7dc5e4dd2488a6 /enc/unicode.c | |
parent | 95ed21881f58485637117980d621333f02910c94 (diff) | |
download | ruby-64f7deb0cb8c5e57d253d491deef82b60327e60e.tar.gz |
remove special processing for U+03B9/U+03BC/U+A64B
* enc/unicode.c: Remove special processing for U+03B9/U+03BC/U+A64B
(GREEK SMALL LETTERs IOTA/MU, CYRILLIC SMALL LETTER MONOGRAPH UK)
from onigenc_unicode_case_map and simplify code.
* enc/unicode/case-folding.rb: Remove check for U+03B9/U+03BC/U+A64B.
This and the previous few related commits make sure that we won't hit
the equivalent of bug #12990 anymore for future updates of Unicode versions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/unicode.c')
-rw-r--r-- | enc/unicode.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/enc/unicode.c b/enc/unicode.c index f7627637d3..39fb24408f 100644 --- a/enc/unicode.c +++ b/enc/unicode.c @@ -768,19 +768,10 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP, } } } - else if ((folded = onigenc_unicode_unfold1_lookup(code)) != 0) { /* data about character found in CaseUnfold_11_Table */ - if (flags&OnigCaseFoldFlags(folded->n)) { /* needs and data availability match */ - MODIFIED; - if (flags&OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_TITLECASE) - code = folded->code[1]; - else - code = folded->code[0]; - } - else if ((flags&(ONIGENC_CASE_UPCASE)) - && (code==0x03B9||code==0x03BC||code==0xA64B)) { /* GREEK SMALL LETTERs IOTA/MU, */ - MODIFIED; /* CYRILLIC SMALL LETTER MONOGRAPH UK */ - code = folded->code[1]; - } + else if ((folded = onigenc_unicode_unfold1_lookup(code)) != 0 /* data about character found in CaseUnfold_11_Table */ + && flags&OnigCaseFoldFlags(folded->n)) { /* needs and data availability match */ + MODIFIED; + code = folded->code[(flags&OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_TITLECASE) ? 1 : 0]; } } to += ONIGENC_CODE_TO_MBC(enc, code, to); |