diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-09-16 16:06:06 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-09-17 18:08:09 +0900 |
commit | afb5971031540d8b1306d94a61b3700a672baf60 (patch) | |
tree | cfcbd356c0bff72d5bfded750c838c977a970452 /lib/rubygems | |
parent | b3969f769a40e09ce5307b58ac78fa732c398aad (diff) |
Merge RubyGems-3.3.22 and Bundler-2.3.22
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/platform.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/query_utils.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 8c5e7993ca..06de5ded8d 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -180,7 +180,7 @@ class Gem::Platform # version ( (@os != "linux" && (@version.nil? || other.version.nil?)) || - (@os == "linux" && ((@version.nil? && ["gnu", "musl"].include?(other.version)) || (@version == "gnu" && other.version.nil?))) || + (@os == "linux" && (other.version == "gnu#{@version}" || other.version == "musl#{@version}" || @version == "gnu#{other.version}")) || @version == other.version ) end diff --git a/lib/rubygems/query_utils.rb b/lib/rubygems/query_utils.rb index a502717f94..c72955f83b 100644 --- a/lib/rubygems/query_utils.rb +++ b/lib/rubygems/query_utils.rb @@ -151,7 +151,7 @@ module Gem::QueryUtils fetcher.detect(specs_type) { true } else fetcher.detect(specs_type) do |name_tuple| - name === name_tuple.name + name === name_tuple.name && options[:version].satisfied_by?(name_tuple.version) end end @@ -159,7 +159,7 @@ module Gem::QueryUtils end def specs_type - if options[:all] + if options[:all] || options[:version].specific? if options[:prerelease] :complete else |