Skip to content

Commit

Permalink
better implementation of hash
Browse files Browse the repository at this point in the history
to_a wasn't always returning things in the same order
so now it actually works
  • Loading branch information
coatl committed Apr 14, 2009
1 parent 4c3a989 commit 31a16fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sequence/weakrefset.rb
Expand Up @@ -113,7 +113,9 @@ def == other
alias eql? == alias eql? ==


def hash def hash
to_a.hash result=0
each{|x| result^=x.hash }
result
end end


# clear the set (return self) # clear the set (return self)
Expand Down

0 comments on commit 31a16fb

Please sign in to comment.