From 6a808bda64f4a6a2e978d71ae0a957906dcb2dd5 Mon Sep 17 00:00:00 2001 From: duerst Date: Tue, 16 Feb 2016 10:10:37 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ enc/unicode/case-folding.rb | 1 + enc/unicode/casefold.h | 26 +++++++++++++------------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 813d90f4ff..ce7e3f4c3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Feb 16 19:10:08 2016 Martin Duerst + + * 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 * numeric.c (compare_with_zero): fix variable name, rb_cmperr diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb index c8c97106c2..27ed04aee9 100755 --- a/enc/unicode/case-folding.rb +++ b/enc/unicode/case-folding.rb @@ -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 diff --git a/enc/unicode/casefold.h b/enc/unicode/casefold.h index 173d7f80ba..c35102bab1 100644 --- a/enc/unicode/casefold.h +++ b/enc/unicode/casefold.h @@ -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}}},