[前][次][番号順一覧][スレッド一覧]

ruby-changes:42238

From: duerst <ko1@a...>
Date: Mon, 28 Mar 2016 14:36:41 +0900 (JST)
Subject: [ruby-changes:42238] duerst:r54312 (trunk): * enc/unicode.c: Minor refactoring for I WITH DOT ABOVE.

duerst	2016-03-28 14:36:35 +0900 (Mon, 28 Mar 2016)

  New Revision: 54312

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54312

  Log:
    * enc/unicode.c: Minor refactoring for I WITH DOT ABOVE.

  Modified files:
    trunk/ChangeLog
    trunk/enc/unicode.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54311)
+++ ChangeLog	(revision 54312)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Mar 28 14:36:36 2016  Martin Duerst  <duerst@i...>
+
+	* enc/unicode.c: Minor refactoring for I WITH DOT ABOVE.
+
 Mon Mar 28 14:26:24 2016  Martin Duerst  <duerst@i...>
 
 	* enc/unicode.c: Removed code now covered by data from table.
Index: enc/unicode.c
===================================================================
--- enc/unicode.c	(revision 54311)
+++ enc/unicode.c	(revision 54312)
@@ -696,10 +696,9 @@ onigenc_unicode_case_map(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L696
 	    if (code==I_WITH_DOT_ABOVE) {
 		if (flags&ONIGENC_CASE_DOWNCASE) {
 		    MODIFIED;
-		    if (flags&ONIGENC_CASE_FOLD_TURKISH_AZERI)
-			code = 'i';
-		    else { /* make dot above explicit */
-			to += ONIGENC_CODE_TO_MBC(enc, 'i', to);
+		    code = 'i';
+		    if (!(flags&ONIGENC_CASE_FOLD_TURKISH_AZERI)) { /* make dot above explicit */
+			to += ONIGENC_CODE_TO_MBC(enc, code, to);
 			code = DOT_ABOVE;
 		    }
 		}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]