mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Add workaround from old rubygems
In these versions, the `approximate_recommendation` method doesn't include the prerelease logic. https://github.com/bundler/bundler/commit/caf13e9e4f
This commit is contained in:
parent
cb6abf551a
commit
bb50f87b69
1 changed files with 9 additions and 1 deletions
|
@ -69,7 +69,15 @@ m = Module.new do
|
|||
def bundler_requirement
|
||||
return "#{Gem::Requirement.default}.a" unless bundler_version
|
||||
|
||||
Gem::Version.new(bundler_version).approximate_recommendation
|
||||
bundler_gem_version = Gem::Version.new(bundler_version)
|
||||
|
||||
requirement = bundler_gem_version.approximate_recommendation
|
||||
|
||||
return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
|
||||
|
||||
requirement += ".a" if bundler_gem_version.prerelease?
|
||||
|
||||
requirement
|
||||
end
|
||||
|
||||
def load_bundler!
|
||||
|
|
Loading…
Add table
Reference in a new issue