Ruby

Ruby

Made by DeepSource

Hash contains duplicate keys RB-LI1012

Bug risk
Major

The hash contains duplicate keys. While this is allowed by Ruby, this usually happens due to typos, and is, in most cases, unintended.

Bad practice

hash = { fruit: 'apple', fruit: 'orange' }

Recommended

hash = { fruit: 'apple', another_fruit: 'orange' }