lib/unicode/name.rb in unicode-name-1.13.0 vs lib/unicode/name.rb in unicode-name-1.13.1

- old
+ new

@@ -61,11 +61,11 @@ "<reserved-#{codepoint_pretty}>" end end def self.readable(char) - unicode_name(char) || + correct(char) || ( as = aliases(char) ) && ( as[:control] && as[:control][0] || as[:figment] && as[:figment][0] || as[:alternate] && as[:alternate][0] || as[:abbreviation] && as[:abbreviation][0] ) || @@ -76,10 +76,10 @@ # See https://en.wikipedia.org/wiki/Korean_language_and_computers#Hangul_Syllables_Area def self.hangul_decomposition(codepoint) base = codepoint - HANGUL_START final = base % HANGUL_FINAL_MAX - medial = (base - final) % HANGUL_MEDIAL_MAX + medial = (base % HANGUL_MEDIAL_MAX) / HANGUL_FINAL_MAX initial = base / HANGUL_MEDIAL_MAX "#{INDEX[:JAMO][:INITIAL][initial]}#{INDEX[:JAMO][:MEDIAL][medial]}#{INDEX[:JAMO][:FINAL][final]}" end end end