Inspectopedia
 
2024.3

Hash with strings as keys

Info
New
Last modified: 03 December 2024

Reports hashes with strings as keys. It is preferable to use symbols instead of strings as hash keys.

Example:

A quick-fix is available to convert all string keys to symbols. After the quick-fix is applied, the result looks like this:

Inspired by 'RuboCop'