ruby-changes:53913
From: duerst <ko1@a...>
Date: Sun, 2 Dec 2018 19:07:48 +0900 (JST)
Subject: [ruby-changes:53913] duerst:r66133 (trunk): solve the genie/zombie/wrestlers bug
duerst 2018-12-02 19:07:42 +0900 (Sun, 02 Dec 2018) New Revision: 66133 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66133 Log: solve the genie/zombie/wrestlers bug enc/unicode.c: - Add U+1F93C (WRESTLERS), U+1F9DE (GENIE), and U+1F9DF to onigenc_unicode_GCB_ranges_E_Base. - Add comments with character names. test/ruby/enc/test_emoji_breaks.rb: Activate tests for genie/zombie/wrestlers. This closes issue #15343. Modified files: trunk/enc/unicode.c trunk/test/ruby/enc/test_emoji_breaks.rb Index: test/ruby/enc/test_emoji_breaks.rb =================================================================== --- test/ruby/enc/test_emoji_breaks.rb (revision 66132) +++ test/ruby/enc/test_emoji_breaks.rb (revision 66133) @@ -25,9 +25,6 @@ class BreakTest https://github.com/ruby/ruby/blob/trunk/test/ruby/enc/test_emoji_breaks.rb#L25 # raise ArgumentError if 0xD800 <= c and c <= 0xDFFF c.chr('UTF-8') end.join - raise ArgumentError if data.match? /genie/ or comment.match? /genie/ - raise ArgumentError if data.match? /zombie/ or comment.match? /zombie/ - raise ArgumentError if data.match? /wrestling/ or comment.match? /wrestling/ end end Index: enc/unicode.c =================================================================== --- enc/unicode.c (revision 66132) +++ enc/unicode.c (revision 66133) @@ -802,19 +802,21 @@ onigenc_unicode_GCB_ranges_GAZ[] = { https://github.com/ruby/ruby/blob/trunk/enc/unicode.c#L802 const OnigCodePoint onigenc_unicode_GCB_ranges_E_Base[] = { - 3, - 0x1F3F3, 0x1F3F3, - 0x1F441, 0x1F441, - 0x1F46F, 0x1F46F, + 5, + 0x1F3F3, 0x1F3F3, /* WAVING WHITE FLAG */ + 0x1F441, 0x1F441, /* EYE */ + 0x1F46F, 0x1F46F, /* WOMAN WITH BUNNY EARS */ + 0x1F93C, 0x1F93C, /* WRESTLERS */ + 0x1F9DE, 0x1F9DF, /* GENIE, ZOMBIE */ }; const OnigCodePoint onigenc_unicode_GCB_ranges_Emoji[] = { 4, - 0x2640, 0x2640, - 0x2642, 0x2642, - 0x2695, 0x2696, - 0x2708, 0x2708, + 0x2640, 0x2640, /* FEMALE SIGN */ + 0x2642, 0x2642, /* MALE SIGN */ + 0x2695, 0x2696, /* SCALES */ + 0x2708, 0x2708, /* AIRPLANE */ }; #if 0 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/