1
0
Fork 0
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:
keiju 2002-08-15 07:36:35 +00:00
parent 8d330378ca
commit b604386fad

View file

@ -240,7 +240,7 @@ class Rational < Numeric
end
def hash
@numerator ^ @denominator
@numerator.hash ^ @denominator.hash
end
attr :numerator