These two operator in Ruby look similar but can have different results when comparing Numeric operators.
1.0 == 1 #=> true 1.eql? 1 #=> false |
As stated in the docs only override the ‘==’ if needed.
:)
These two operator in Ruby look similar but can have different results when comparing Numeric operators.
1.0 == 1 #=> true 1.eql? 1 #=> false |
As stated in the docs only override the ‘==’ if needed.
:)