Skip to content

Commit

Permalink
[Source::Lock] Avoid hash collisions with un-wrapped sources
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Dec 17, 2016
1 parent d97df54 commit 0ae8bca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rubygems/source/lock.rb
Expand Up @@ -34,6 +34,10 @@ def == other # :nodoc:
0 == (self <=> other)
end

def hash # :nodoc:
@wrapped.hash ^ 3
end

##
# Delegates to the wrapped source's fetch_spec method.

Expand All @@ -46,4 +50,3 @@ def uri # :nodoc:
end

end

0 comments on commit 0ae8bca

Please sign in to comment.