ruby-changes:43559
From: duerst <ko1@a...>
Date: Mon, 11 Jul 2016 18:05:57 +0900 (JST)
Subject: [ruby-changes:43559] duerst:r55632 (trunk): * enc/iso_8859_1.c: Moved test for lowercase characters without
duerst 2016-07-11 18:05:53 +0900 (Mon, 11 Jul 2016) New Revision: 55632 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55632 Log: * enc/iso_8859_1.c: Moved test for lowercase characters without uppercase equivalent. Modified files: trunk/ChangeLog trunk/enc/iso_8859_1.c Index: ChangeLog =================================================================== --- ChangeLog (revision 55631) +++ ChangeLog (revision 55632) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jul 11 18:05:40 2016 Martin Duerst <duerst@i...> + + * enc/iso_8859_1.c: Moved test for lowercase characters without + uppercase equivalent. + Mon Jul 11 17:49:25 2016 Martin Duerst <duerst@i...> * enc/iso_8859_4.c, enc/iso_8859_10.c, enc/iso_8859_14.c, Index: enc/iso_8859_1.c =================================================================== --- enc/iso_8859_1.c (revision 55631) +++ enc/iso_8859_1.c (revision 55632) @@ -279,7 +279,6 @@ case_map (OnigCaseFoldType* flagP, const https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L279 code = 's'; } } - else if (code==0xAA || code==0xBA || code==0xB5 || code==0xFF) ; else if ((EncISO_8859_1_CtypeTable[code] & BIT_CTYPE_UPPER) && (flags & (ONIGENC_CASE_DOWNCASE|ONIGENC_CASE_FOLD))) { flags |= ONIGENC_CASE_MODIFIED; @@ -288,7 +287,10 @@ case_map (OnigCaseFoldType* flagP, const https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L287 else if ((EncISO_8859_1_CtypeTable[code]&BIT_CTYPE_LOWER) && (flags&ONIGENC_CASE_UPCASE)) { flags |= ONIGENC_CASE_MODIFIED; - code -= 0x20; + if (code==0xAA || code==0xBA || code==0xB5 || code==0xFF) + ; + else + code -= 0x20; } *to++ = code; if (flags&ONIGENC_CASE_TITLECASE) /* switch from titlecase to lowercase for capitalize */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/