ruby-changes:41704
From: duerst <ko1@a...>
Date: Mon, 8 Feb 2016 20:44:06 +0900 (JST)
Subject: [ruby-changes:41704] duerst:r53778 (trunk): * string.c, enc/unicode.c: Disassociating ONIGENC_CASE_FOLD flag from
duerst 2016-02-08 20:44:12 +0900 (Mon, 08 Feb 2016) New Revision: 53778 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53778 Log: * string.c, enc/unicode.c: Disassociating ONIGENC_CASE_FOLD flag from ONIGENC_CASE_DOWNCASE. (with Kimihito Matsui) Modified files: trunk/ChangeLog trunk/enc/unicode.c trunk/string.c Index: enc/unicode.c =================================================================== --- enc/unicode.c (revision 53777) +++ enc/unicode.c (revision 53778) @@ -651,7 +651,7 @@ onigenc_unicode_case_map(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L651 } } else if (code>='A' && code<='Z') { - if (flags&ONIGENC_CASE_DOWNCASE) { + if (flags&(ONIGENC_CASE_DOWNCASE|ONIGENC_CASE_FOLD)) { MODIFIED; if (flags&ONIGENC_CASE_FOLD_TURKISH_AZERI && code=='I') code = DOTLESS_i; Index: string.c =================================================================== --- string.c (revision 53777) +++ string.c (revision 53778) @@ -5647,7 +5647,7 @@ check_case_options(int argc, VALUE *argv https://github.com/ruby/ruby/blob/trunk/string.c#L5647 flags |= ONIGENC_CASE_ASCII_ONLY; else if (argv[0]==sym_fold) { if ((flags & (ONIGENC_CASE_UPCASE|ONIGENC_CASE_DOWNCASE)) == ONIGENC_CASE_DOWNCASE) - flags |= ONIGENC_CASE_FOLD; + flags ^= ONIGENC_CASE_FOLD|ONIGENC_CASE_DOWNCASE; else rb_raise(rb_eArgError, "option :fold only allowed for downcasing"); } Index: ChangeLog =================================================================== --- ChangeLog (revision 53777) +++ ChangeLog (revision 53778) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Feb 8 20:43:57 2016 Martin Duerst <duerst@i...> + + * string.c, enc/unicode.c: Disassociating ONIGENC_CASE_FOLD flag from + ONIGENC_CASE_DOWNCASE. + (with Kimihito Matsui) + Mon Feb 8 13:00:17 2016 Martin Duerst <duerst@i...> * enc/unicode.c: Shortened macros for enc/unicode/casefold.h to -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/