1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enc/unicode/case-folding.rb, casefold.h: Used only first element

(rather than all) of target in CaseUnfold_11 array.
  (with Kimihito Matsui)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2016-02-16 10:10:37 +00:00
parent 527fa61087
commit 6a808bda64
3 changed files with 20 additions and 13 deletions

View file

@ -1,3 +1,9 @@
Tue Feb 16 19:10:08 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* 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@ruby-lang.org>
* numeric.c (compare_with_zero): fix variable name, rb_cmperr

View file

@ -222,6 +222,7 @@ class CaseMapping
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

View file

@ -3169,7 +3169,7 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
{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 CaseUnfold_11_Table[] = {
{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 CaseUnfold_11_Table[] = {
{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 CaseUnfold_11_Table[] = {
{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 CaseUnfold_11_Table[] = {
{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}}},