Compare objects inheriting from the same class
krzysiek1507 opened this issue · comments
BetterHash = Class.new Hash
EvenBetterHash = Class.new Hash
HashDiff.diff(BetterHash.new, EvenBetterHash.new)
=> [["~", "", {}, {}]]
HashDiff.diff({}, BetterHash.new)
=> []
HashDiff.diff(BetterHash.new, {})
=> [["~", "", {}, {}]]
I wonder when we can compare two objects. When they inherit from the same class or they have to be instances of the same class?
Maybe it should always return []
?