diff --git a/utils/font_helper/.rubocop_todo.yml b/utils/font_helper/.rubocop_todo.yml index ff02c38..de31eea 100644 --- a/utils/font_helper/.rubocop_todo.yml +++ b/utils/font_helper/.rubocop_todo.yml @@ -6,12 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Style/MapToHash: - Exclude: - - 'source/font_helper/font.rb' - # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. diff --git a/utils/font_helper/source/font_helper/font.rb b/utils/font_helper/source/font_helper/font.rb index c6099b5..4b789a9 100644 --- a/utils/font_helper/source/font_helper/font.rb +++ b/utils/font_helper/source/font_helper/font.rb @@ -9,9 +9,9 @@ class FontHelper def initialize(width, height, characters = nil) @width = width @height = height - @characters = characters.map do |character| + @characters = characters.to_h do |character| [character.code, character] - end.to_h + end end def <<(character)