summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver/api_specification.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2020-12-08 16:33:39 +0900
committerHiroshi SHIBATA <[email protected]>2020-12-08 17:30:02 +0900
commit4aca77edde91f826aa243e268bf1ef5214530583 (patch)
treeef0cf1a95fcced00ca5fa40f3412c567bf95d705 /lib/rubygems/resolver/api_specification.rb
parent6a6a24df9b72750d12f9b15192bdb7517e668efb (diff)
Merge prepare version of RubyGems 3.2.0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3864
Diffstat (limited to 'lib/rubygems/resolver/api_specification.rb')
-rw-r--r--lib/rubygems/resolver/api_specification.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/resolver/api_specification.rb b/lib/rubygems/resolver/api_specification.rb
index 232c2b041b..589ea1ba61 100644
--- a/lib/rubygems/resolver/api_specification.rb
+++ b/lib/rubygems/resolver/api_specification.rb
@@ -46,6 +46,10 @@ class Gem::Resolver::APISpecification < Gem::Resolver::Specification
@dependencies == other.dependencies
end
+ def hash
+ @set.hash ^ @name.hash ^ @version.hash ^ @platform.hash ^ @dependencies.hash
+ end
+
def fetch_development_dependencies # :nodoc:
spec = source.fetch_spec Gem::NameTuple.new @name, @version, @platform
@@ -53,7 +57,7 @@ class Gem::Resolver::APISpecification < Gem::Resolver::Specification
end
def installable_platform? # :nodoc:
- Gem::Platform.match @platform
+ Gem::Platform.match_gem? @platform, @name
end
def pretty_print(q) # :nodoc: