Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove calls to VariableExchangeBank#same_currency? from money.rb

  • Loading branch information...
commit 86f78a2589a4d40d715651a2dbf6c4e185d7643c 1 parent 46ab9ab
@semmons99 semmons99 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/money/money.rb
View
4 lib/money/money.rb
@@ -106,7 +106,7 @@ def currency_as_string=(val)
def ==(other_money)
if other_money.respond_to?(:to_money)
other_money = other_money.to_money
- cents == other_money.cents && bank.same_currency?(currency, other_money.currency)
+ cents == other_money.cents && self.currency == other_money.currency
else
false
end
@@ -128,7 +128,7 @@ def eql?(other_money)
def <=>(other_money)
if other_money.respond_to?(:to_money)
other_money = other_money.to_money
- if bank.same_currency?(currency, other_money.currency)
+ if self.currency == other_money.currency
cents <=> other_money.cents
else
cents <=> other_money.exchange_to(currency).cents
Please sign in to comment.
Something went wrong with that request. Please try again.