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

ruby-changes:41769

From: duerst <ko1@a...>
Date: Tue, 16 Feb 2016 19:10:15 +0900 (JST)
Subject: [ruby-changes:41769] duerst:r53843 (trunk): * enc/unicode/case-folding.rb, casefold.h: Used only first element

duerst	2016-02-16 19:10:37 +0900 (Tue, 16 Feb 2016)

  New Revision: 53843

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

  Log:
    * enc/unicode/case-folding.rb, casefold.h: Used only first element
      (rather than all) of target in CaseUnfold_11 array.
      (with Kimihito Matsui)

  Modified files:
    trunk/ChangeLog
    trunk/enc/unicode/case-folding.rb
    trunk/enc/unicode/casefold.h
Index: enc/unicode/casefold.h
===================================================================
--- enc/unicode/casefold.h	(revision 53842)
+++ enc/unicode/casefold.h	(revision 53843)
@@ -3169,7 +3169,7 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3169
   {0x0067, {1|U, {0x0047}}},
   {0x0068, {1|U, {0x0048}}},
   {0x006a, {1|U, {0x004a}}},
-  {0x006b, {2, {0x004b, 0x212a}}},
+  {0x006b, {2|U, {0x004b, 0x212a}}},
   {0x006c, {1|U, {0x004c}}},
   {0x006d, {1|U, {0x004d}}},
   {0x006e, {1|U, {0x004e}}},
@@ -3177,7 +3177,7 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3177
   {0x0070, {1|U, {0x0050}}},
   {0x0071, {1|U, {0x0051}}},
   {0x0072, {1|U, {0x0052}}},
-  {0x0073, {2, {0x0053, 0x017f}}},
+  {0x0073, {2|U, {0x0053, 0x017f}}},
   {0x0074, {1|U, {0x0054}}},
   {0x0075, {1|U, {0x0055}}},
   {0x0076, {1|U, {0x0056}}},
@@ -3190,7 +3190,7 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3190
   {0x00e2, {1|U, {0x00c2}}},
   {0x00e3, {1|U, {0x00c3}}},
   {0x00e4, {1|U, {0x00c4}}},
-  {0x00e5, {2, {0x00c5, 0x212b}}},
+  {0x00e5, {2|U, {0x00c5, 0x212b}}},
   {0x00e6, {1|U, {0x00c6}}},
   {0x00e7, {1|U, {0x00c7}}},
   {0x00e8, {1|U, {0x00c8}}},
@@ -3405,29 +3405,29 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3405
   {0x03ae, {1|U, {0x0389}}},
   {0x03af, {1|U, {0x038a}}},
   {0x03b1, {1|U, {0x0391}}},
-  {0x03b2, {2, {0x0392, 0x03d0}}},
+  {0x03b2, {2|U, {0x0392, 0x03d0}}},
   {0x03b3, {1|U, {0x0393}}},
   {0x03b4, {1|U, {0x0394}}},
-  {0x03b5, {2, {0x0395, 0x03f5}}},
+  {0x03b5, {2|U, {0x0395, 0x03f5}}},
   {0x03b6, {1|U, {0x0396}}},
   {0x03b7, {1|U, {0x0397}}},
-  {0x03b8, {3, {0x0398, 0x03d1, 0x03f4}}},
+  {0x03b8, {3|U, {0x0398, 0x03d1, 0x03f4}}},
   {0x03b9, {3, {0x0345, 0x0399, 0x1fbe}}},
-  {0x03ba, {2, {0x039a, 0x03f0}}},
+  {0x03ba, {2|U, {0x039a, 0x03f0}}},
   {0x03bb, {1|U, {0x039b}}},
   {0x03bc, {2, {0x00b5, 0x039c}}},
   {0x03bd, {1|U, {0x039d}}},
   {0x03be, {1|U, {0x039e}}},
   {0x03bf, {1|U, {0x039f}}},
-  {0x03c0, {2, {0x03a0, 0x03d6}}},
-  {0x03c1, {2, {0x03a1, 0x03f1}}},
-  {0x03c3, {2, {0x03a3, 0x03c2}}},
+  {0x03c0, {2|U, {0x03a0, 0x03d6}}},
+  {0x03c1, {2|U, {0x03a1, 0x03f1}}},
+  {0x03c3, {2|U, {0x03a3, 0x03c2}}},
   {0x03c4, {1|U, {0x03a4}}},
   {0x03c5, {1|U, {0x03a5}}},
-  {0x03c6, {2, {0x03a6, 0x03d5}}},
+  {0x03c6, {2|U, {0x03a6, 0x03d5}}},
   {0x03c7, {1|U, {0x03a7}}},
   {0x03c8, {1|U, {0x03a8}}},
-  {0x03c9, {2, {0x03a9, 0x2126}}},
+  {0x03c9, {2|U, {0x03a9, 0x2126}}},
   {0x03ca, {1|U, {0x03aa}}},
   {0x03cb, {1|U, {0x03ab}}},
   {0x03cc, {1|U, {0x038c}}},
@@ -3772,7 +3772,7 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3772
   {0x1e5b, {1|U, {0x1e5a}}},
   {0x1e5d, {1|U, {0x1e5c}}},
   {0x1e5f, {1|U, {0x1e5e}}},
-  {0x1e61, {2, {0x1e60, 0x1e9b}}},
+  {0x1e61, {2|U, {0x1e60, 0x1e9b}}},
   {0x1e63, {1|U, {0x1e62}}},
   {0x1e65, {1|U, {0x1e64}}},
   {0x1e67, {1|U, {0x1e66}}},
Index: enc/unicode/case-folding.rb
===================================================================
--- enc/unicode/case-folding.rb	(revision 53842)
+++ enc/unicode/case-folding.rb	(revision 53843)
@@ -222,6 +222,7 @@ class CaseMapping https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L222
     flags += '|F' if type=='CaseFold_11'
     from = Array(from).map {|i| "%04X" % i}.join(" ")
     to   = Array(to).map {|i| "%04X" % i}.join(" ")
+    to = to.split(/ /).first  if type=='CaseUnfold_11'
     item = @mappings[from]
     if item
       flags += '|U'  if to==item.upper
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53842)
+++ ChangeLog	(revision 53843)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb 16 19:10:08 2016  Martin Duerst  <duerst@i...>
+
+	* enc/unicode/case-folding.rb, casefold.h: Used only first element
+	  (rather than all) of target in CaseUnfold_11 array.
+	  (with Kimihito Matsui)
+
 Tue Feb 16 18:24:38 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* numeric.c (compare_with_zero): fix variable name, rb_cmperr

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

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