lib/suika/char_def.rb in suika-0.1.3 vs lib/suika/char_def.rb in suika-0.1.4

- old
+ new

@@ -3,14 +3,15 @@ module Suika # @!visibility private class CharDef # @!visibility private def self.char_type(ch) - code = ch.unpack1('U*') - CHAR_TYPES.find do |ctype| - Object.const_get("::Suika::CharDef::#{ctype}").any? { |r| r.include?(code) } + ch_code = ch.unpack1('U*') + ch_type = CHAR_TYPES.find do |ct| + Object.const_get("::Suika::CharDef::#{ct}").any? { |r| r.include?(ch_code) } end + ch_type || 'DEFAULT' end # @!visibility private def self.char_category(ch) CHAR_CATEGORY[char_type(ch)] @@ -117,9 +118,10 @@ 0x2800..0x28FF, # Braille Patterns 0x2900..0x297F, # Supplemental Arrows B 0x2B00..0x2BFF, # Miscellaneous Symbols and Arrows 0x2A00..0x2AFF, # Supplemental Mathematical Operators 0x3300..0x33FF, + 0x32FF..0x32FF, # Square era name REIWA 0x3200..0x32FE, # ENclosed CJK Letters and Months 0x3000..0x303F, # CJK Symbol and Punctuation 0xFE30..0xFE4F, # CJK Compatibility Forms 0xFE50..0xFE6B, # Small Form Variants # 0x3007 SYMBOL KANJINUMERIC