summaryrefslogtreecommitdiff
path: root/lib/rubygems/request_set.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2020-12-23 08:45:19 +0900
committerHiroshi SHIBATA <[email protected]>2020-12-23 10:17:41 +0900
commit339227363ce0cf967fa17efa4489d823932ddabd (patch)
tree576482ce00d03439f2dbf4714a6f309293884c2f /lib/rubygems/request_set.rb
parent733ed1e18498f97250b788f169c37b170e0cf2b6 (diff)
Merge RubyGems 3.2.3 and Bundler 2.2.3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3982
Diffstat (limited to 'lib/rubygems/request_set.rb')
-rw-r--r--lib/rubygems/request_set.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/rubygems/request_set.rb b/lib/rubygems/request_set.rb
index a8a06d0b95..5190cfc904 100644
--- a/lib/rubygems/request_set.rb
+++ b/lib/rubygems/request_set.rb
@@ -195,19 +195,8 @@ class Gem::RequestSet
yield req, installer if block_given?
end
rescue Gem::RuntimeRequirementNotMetError => e
- recent_match = req.spec.set.find_all(req.request).sort_by(&:version).reverse_each.find do |s|
- s = s.spec
- s.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
- s.required_rubygems_version.satisfied_by?(Gem.rubygems_version) &&
- Gem::Platform.installable?(s)
- end
- if recent_match
- suggestion = "The last version of #{req.request} to support your Ruby & RubyGems was #{recent_match.version}. Try installing it with `gem install #{recent_match.name} -v #{recent_match.version}`"
- suggestion += " and then running the current command again" unless @always_install.include?(req.spec.spec)
- else
- suggestion = "There are no versions of #{req.request} compatible with your Ruby & RubyGems"
- suggestion += ". Maybe try installing an older version of the gem you're looking for?" unless @always_install.include?(req.spec.spec)
- end
+ suggestion = "There are no versions of #{req.request} compatible with your Ruby & RubyGems"
+ suggestion += ". Maybe try installing an older version of the gem you're looking for?" unless @always_install.include?(req.spec.spec)
e.suggestion = suggestion
raise
end