lib/physical/cuboid.rb in physical-0.4.3 vs lib/physical/cuboid.rb in physical-0.4.4

- old
+ new

@@ -24,10 +24,11 @@ return Measured::Density(0.0, :g_ml) if volume.value.infinite? Measured::Density(weight.convert_to(:g).value / volume.convert_to(:ml).value, :g_ml) end def ==(other) - id == other.id + other.is_a?(self.class) && + id == other&.id end private NORMALIZED_METHOD_REGEX = /(\w+)\??$/