Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/money/money/arithmetic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def -@
# @see Money.strict_eql_compare
def eql?(other)
if other.is_a?(Money)
if !Money.strict_eql_compare && fractional == 0 && other.fractional == 0
if !Money.strict_eql_compare && fractional == 0 && other.fractional == 0 && currency != other.currency
warn "[DEPRECATION] Comparing 0 #{currency} with 0 " \
"#{other.currency} using `#eql?` will return false in " \
"future versions of Money. Opt-in to the new behavior by " \
Expand Down