Skip to content

Commit

Permalink
Merge pull request RubyMoney#503 from arthurkarganyan/patch-2
Browse files Browse the repository at this point in the history
eql? method replaced by alias_method :eql?, :==
  • Loading branch information
ggilder committed Mar 12, 2015
2 parents d9e0bd8 + c86bbbf commit e0eb7a5
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/money/currency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def stringify_keys

alias_method :separator, :decimal_mark
alias_method :delimiter, :thousands_separator
alias_method :eql?, :==

# Create a new +Currency+ object.
#
Expand Down Expand Up @@ -300,22 +301,6 @@ def compare_ids(other_currency)
end
private :compare_ids

# Compares +self+ with +other_currency+ and returns +true+ if the are the
# same or if their +id+ attributes match.
#
# @param [Money::Currency] other_currency The currency to compare to.
#
# @return [Boolean]
#
# @example
# c1 = Money::Currency.new(:usd)
# c2 = Money::Currency.new(:jpy)
# c1.eql? c1 #=> true
# c1.eql? c2 #=> false
def eql?(other_currency)
self == other_currency
end

# Returns a Fixnum hash value based on the +id+ attribute in order to use
# functions like & (intersection), group_by, etc.
#
Expand Down

0 comments on commit e0eb7a5

Please sign in to comment.