summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-07-21 09:33:05 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-07-21 17:05:48 -0400
commit8cd671162e18b07025d9505d03d73caea17406d6 (patch)
tree1925e7414cf729f41e384c4b54954774d828dcfd /lib
parenteaa81a57156c316d4c9f7548fb04e4712b47bfd8 (diff)
downloadbundler-8cd671162e18b07025d9505d03d73caea17406d6.tar.gz
[LazySpecification] Avoid hash collisions in #identifier
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/lazy_specification.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 4c1af93ba0..36ff5c59ed 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -5,6 +5,8 @@ require "bundler/match_platform"
module Bundler
class LazySpecification
+ Identifier = Struct.new(:name, :version, :source, :platform, :dependencies)
+
include MatchPlatform
attr_reader :name, :version, :dependencies, :platform
@@ -69,7 +71,7 @@ module Bundler
end
def identifier
- @__identifier ||= [name, version, source, platform, dependencies].hash
+ @__identifier ||= Identifier.new(name, version, source, platform, dependencies)
end
private