Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fix `Money::Currency.reset!` keeping the cached key set, so a currency registered before the reset was still accepted by `Money::Currency.new` and raised `NoMethodError` instead of `UnknownCurrency`
- Fix `Money::Bank::VariableExchange#import_rates` parsing `:json` with `JSON.load`, which instantiates any class named by a `json_class` key; it now uses `JSON.parse`
- Fix deprecation warning for eql?

## 7.1.1

Expand Down
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
Loading