Objects redefining #eql? method should redefine #hash method too. These two methods must be paired, otherwise some actions like subtracting arrays could generate unexpected results.
Coverage increased (+0.03%) to 40.923% when pulling 8f57a3e4cb1ad1a935596fd56d50af3cb43d0231 on joseivanlopez:equatable into e9b29cf6ac80a2ef9148021c516f4e58e09d9123 on yast:master.
Problem
Objects redefining
#eql?
method should redefine#hash
method too. These two methods must be paired, otherwise some actions like subtracting arrays could generate unexpected results.Solution
Add a
Equatable
mixin for keep#eql?
and#hash
paired.