summaryrefslogtreecommitdiff
path: root/lib/rubygems/query_utils.rb
diff options
context:
space:
mode:
authorAntonio Paulino <[email protected]>2022-08-29 16:00:07 -0300
committergit <[email protected]>2022-09-07 06:18:58 +0900
commit4c1f6750f2c333be2adf7ceab644598b230606d2 (patch)
tree47c80d6c2659e5aeda37f962429be7d23cc9899e /lib/rubygems/query_utils.rb
parent87ef90909b7656aaf8bb968376b879f9aa207a0b (diff)
[rubygems/rubygems] Fix: Gem info bug with version flag
https://github.com/rubygems/rubygems/commit/e4cee1f975
Diffstat (limited to 'lib/rubygems/query_utils.rb')
-rw-r--r--lib/rubygems/query_utils.rb4
1 files changed, 2 insertions, 2 deletions
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