ruby-changes:43090
From: duerst <ko1@a...>
Date: Wed, 25 May 2016 19:07:23 +0900 (JST)
Subject: [ruby-changes:43090] duerst:r55164 (trunk): * enc/unicode.c: Handle DOTLESS_i by hand because it isn't involved in folding.
duerst 2016-05-25 19:07:19 +0900 (Wed, 25 May 2016) New Revision: 55164 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55164 Log: * enc/unicode.c: Handle DOTLESS_i by hand because it isn't involved in folding. Modified files: trunk/ChangeLog trunk/enc/unicode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 55163) +++ ChangeLog (revision 55164) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed May 25 19:07:19 2016 Martin Duerst <duerst@i...> + + * enc/unicode.c: Handle DOTLESS_i by hand because it isn't involved in folding. + Wed May 25 18:30:53 2016 NARUSE, Yui <naruse@r...> * regparse.c (fetch_token_in_cc): raise error if given octal escaped Index: enc/unicode.c =================================================================== --- enc/unicode.c (revision 55163) +++ enc/unicode.c (revision 55164) @@ -701,7 +701,7 @@ onigenc_unicode_case_map(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L701 const CodePointList3 *folded; if (code==I_WITH_DOT_ABOVE) { - if (flags&ONIGENC_CASE_DOWNCASE) { + if (flags&(ONIGENC_CASE_DOWNCASE|ONIGENC_CASE_FOLD)) { MODIFIED; code = 'i'; if (!(flags&ONIGENC_CASE_FOLD_TURKISH_AZERI)) { /* make dot above explicit */ @@ -710,6 +710,10 @@ onigenc_unicode_case_map(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L710 } } } + else if (code==DOTLESS_i) { /* handle this manually, because it isn't involved in folding */ + if (flags&ONIGENC_CASE_UPCASE) + MODIFIED, code = 'I'; + } else if ((folded = onigenc_unicode_fold_lookup(code)) != 0) { /* data about character found in CaseFold_11_Table */ if ((flags&ONIGENC_CASE_TITLECASE) /* Titlecase needed, */ && (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE)) { /* but already Titlecase */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/