Closed kmcphillips closed 9 years ago
@Shopify/shipping
Changes implementation of comparison operators (==, .eql?, and <=>) to do the conversion between units. Does this only as needed.
==
.eql?
<=>
Update the convert_to operator to exit early and return the measurement unchanged if the conversion is to the unit it is already in.
convert_to
Example, this was false but is now true:
> Measured::Length(1000, :cm) == Measured::Length(1, :m) true
Bumps to version 0.0.6
0.0.6
@Shopify/shipping
Changes implementation of comparison operators (
==
,.eql?
, and<=>
) to do the conversion between units. Does this only as needed.Update the
convert_to
operator to exit early and return the measurement unchanged if the conversion is to the unit it is already in.Example, this was false but is now true: