diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-10-16 10:36:37 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-10-23 13:59:01 +0900 |
commit | e7d845b1d0154651962f34eefb37ffb0ac0c4e0a (patch) | |
tree | c47875e5fe4a918d329e831476177b0e8b373f92 /lib/bundler | |
parent | 6dcd4e90d8d2a2db06a140cf10c5d9519360fc69 (diff) | |
download | ruby-e7d845b1d0154651962f34eefb37ffb0ac0c4e0a.tar.gz |
[rubygems/rubygems] Restore using old way of passing Ruby version to resolver
We used `Bundler::RubyVersion.system.gem_version` for a long time, but I
changed this to `Gem.ruby_version` at
https://github.com/rubygems/rubygems/commit/94f96439438e. It's unclear why I did that
though since I believe it was unrelated to the fix in there.
Bootboot patches `Bundler::RubyVersion` to customize how Bundler works
with Ruby versions, and that change broke that.
Since it's unclear to me how to achieve what Bootboot is doing with the
current code, and there was no strong reason for the change, let's
restore it for now.
https://github.com/rubygems/rubygems/commit/8ec36c6017
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source/metadata.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 3815a55b04..761185ff21 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -885,7 +885,7 @@ module Bundler def metadata_dependencies @metadata_dependencies ||= [ - Dependency.new("Ruby\0", Gem.ruby_version), + Dependency.new("Ruby\0", Bundler::RubyVersion.system.gem_version), Dependency.new("RubyGems\0", Gem::VERSION), ] end diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb index 524db9c204..4d27761365 100644 --- a/lib/bundler/source/metadata.rb +++ b/lib/bundler/source/metadata.rb @@ -5,7 +5,7 @@ module Bundler class Metadata < Source def specs @specs ||= Index.build do |idx| - idx << Gem::Specification.new("Ruby\0", Gem.ruby_version) + idx << Gem::Specification.new("Ruby\0", Bundler::RubyVersion.system.gem_version) idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s| s.required_rubygems_version = Gem::Requirement.default end |