mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rational.rb(Rational#hash): modify algorism for hash-function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d330378ca
commit
b604386fad
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ class Rational < Numeric
|
|||
end
|
||||
|
||||
def hash
|
||||
@numerator ^ @denominator
|
||||
@numerator.hash ^ @denominator.hash
|
||||
end
|
||||
|
||||
attr :numerator
|
||||
|
|
Loading…
Reference in a new issue