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

ruby-changes:41817

From: duerst <ko1@a...>
Date: Mon, 22 Feb 2016 18:34:00 +0900 (JST)
Subject: [ruby-changes:41817] duerst:r53891 (trunk): * enc/unicode/case-folding.rb, casefold.h: Adding flag for title-case,

duerst	2016-02-22 18:34:34 +0900 (Mon, 22 Feb 2016)

  New Revision: 53891

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

  Log:
    * enc/unicode/case-folding.rb, casefold.h: Adding flag for title-case,
      not yet operational.
      (with Kimihito Matsui)

  Modified files:
    trunk/ChangeLog
    trunk/enc/unicode/case-folding.rb
    trunk/enc/unicode/casefold.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53890)
+++ ChangeLog	(revision 53891)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Feb 22 18:33:55 2016  Martin Duerst  <duerst@i...>
+
+	* enc/unicode/case-folding.rb, casefold.h: Adding flag for title-case,
+	  not yet operational.
+	  (with Kimihito Matsui)
+
 Mon Feb 22 18:17:03 2016  Martin Duerst  <duerst@i...>
 
 	* enc/unicode/case-folding.rb, casefold.h: Fixed bug that avoided inclusion
Index: enc/unicode/casefold.h
===================================================================
--- enc/unicode/casefold.h	(revision 53890)
+++ enc/unicode/casefold.h	(revision 53891)
@@ -160,12 +160,12 @@ static const CaseFold_11_Type CaseFold_1 https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L160
   {0x01b7, {1|F|D, {0x0292}}},
   {0x01b8, {1|F|D, {0x01b9}}},
   {0x01bc, {1|F|D, {0x01bd}}},
-  {0x01c4, {1|F|D, {0x01c6}}},
-  {0x01c5, {1|F|D, {0x01c6}}},
-  {0x01c7, {1|F|D, {0x01c9}}},
-  {0x01c8, {1|F|D, {0x01c9}}},
-  {0x01ca, {1|F|D, {0x01cc}}},
-  {0x01cb, {1|F|D, {0x01cc}}},
+  {0x01c4, {1|F|D|T, {0x01c6}}},
+  {0x01c5, {1|F|D|T, {0x01c6}}},
+  {0x01c7, {1|F|D|T, {0x01c9}}},
+  {0x01c8, {1|F|D|T, {0x01c9}}},
+  {0x01ca, {1|F|D|T, {0x01cc}}},
+  {0x01cb, {1|F|D|T, {0x01cc}}},
   {0x01cd, {1|F|D, {0x01ce}}},
   {0x01cf, {1|F|D, {0x01d0}}},
   {0x01d1, {1|F|D, {0x01d2}}},
@@ -184,8 +184,8 @@ static const CaseFold_11_Type CaseFold_1 https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L184
   {0x01ec, {1|F|D, {0x01ed}}},
   {0x01ee, {1|F|D, {0x01ef}}},
   {0x01f0, {2|F, {0x006a, 0x030c}}},
-  {0x01f1, {1|F|D, {0x01f3}}},
-  {0x01f2, {1|F|D, {0x01f3}}},
+  {0x01f1, {1|F|D|T, {0x01f3}}},
+  {0x01f2, {1|F|D|T, {0x01f3}}},
   {0x01f4, {1|F|D, {0x01f5}}},
   {0x01f6, {1|F|D, {0x0195}}},
   {0x01f7, {1|F|D, {0x01bf}}},
@@ -3298,9 +3298,9 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3298
   {0x01b9, {1|U, {0x01b8}}},
   {0x01bd, {1|U, {0x01bc}}},
   {0x01bf, {1|U, {0x01f7}}},
-  {0x01c6, {2|U, {0x01c4, 0x01c5}}},
-  {0x01c9, {2|U, {0x01c7, 0x01c8}}},
-  {0x01cc, {2|U, {0x01ca, 0x01cb}}},
+  {0x01c6, {2|U|T, {0x01c4, 0x01c5}}},
+  {0x01c9, {2|U|T, {0x01c7, 0x01c8}}},
+  {0x01cc, {2|U|T, {0x01ca, 0x01cb}}},
   {0x01ce, {1|U, {0x01cd}}},
   {0x01d0, {1|U, {0x01cf}}},
   {0x01d2, {1|U, {0x01d1}}},
@@ -3319,7 +3319,7 @@ static const CaseUnfold_11_Type CaseUnfo https://github.com/ruby/ruby/blob/trunk/enc/unicode/casefold.h#L3319
   {0x01eb, {1|U, {0x01ea}}},
   {0x01ed, {1|U, {0x01ec}}},
   {0x01ef, {1|U, {0x01ee}}},
-  {0x01f3, {2|U, {0x01f1, 0x01f2}}},
+  {0x01f3, {2|U|T, {0x01f1, 0x01f2}}},
   {0x01f5, {1|U, {0x01f4}}},
   {0x01f9, {1|U, {0x01f8}}},
   {0x01fb, {1|U, {0x01fa}}},
Index: enc/unicode/case-folding.rb
===================================================================
--- enc/unicode/case-folding.rb	(revision 53890)
+++ enc/unicode/case-folding.rb	(revision 53891)
@@ -187,7 +187,7 @@ class CaseFolding https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L187
 end
 
 class MapItem
-  attr_reader :upper, :lower
+  attr_reader :upper, :lower, :title
 
   def initialize(code, upper, lower, title)
     @code = code
@@ -226,6 +226,7 @@ class CaseMapping https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L226
     if item
       flags += '|U'  if to==item.upper
       flags += '|D'  if to==item.lower
+      flags += '|T'  unless item.upper==item.title
     end
     flags
   end

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

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