lib/unicode/name.rb in unicode-name-1.4.1 vs lib/unicode/name.rb in unicode-name-1.4.2
- old
+ new
@@ -24,10 +24,12 @@
class << self; alias of unicode_name; end
def self.correct(char)
codepoint = char.unpack("U")[0]
require_relative "name/index" unless defined? ::Unicode::Name::INDEX
- if correction = INDEX[:ALIASES][codepoint] && INDEX[:ALIASES][codepoint][:correction][-1]
+ if correction = INDEX[:ALIASES][codepoint] &&
+ INDEX[:ALIASES][codepoint][:correction] &&
+ INDEX[:ALIASES][codepoint][:correction][-1]
correction
else
unicode_name(char)
end
end