summaryrefslogtreecommitdiff
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorSamuel Giddins <[email protected]>2024-09-19 15:10:40 -0700
committergit <[email protected]>2024-09-20 14:26:13 +0000
commit43e3416b700e421ffdff3a9c534e1de620bb7ad6 (patch)
tree5d36bf7eaf46118b2417182ae401f6e3e669046b /lib/bundler/source
parent7836626f92be77c02da633077863f84435acee5d (diff)
[rubygems/rubygems] Unconditionally set installed_by_version
It has been supported since RubyGems 2.2.0 via https://github.com/rubygems/rubygems/commit/4525e45a4d45 Signed-off-by: Samuel Giddins <[email protected]> https://github.com/rubygems/rubygems/commit/bf39c583e8
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/git.rb2
-rw-r--r--lib/bundler/source/path.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 2a327e5fb6..c52ce04638 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -299,7 +299,7 @@ module Bundler
# The gemspecs we cache should already be evaluated.
spec = Bundler.load_gemspec(spec_path)
next unless spec
- Bundler.rubygems.set_installed_by_version(spec)
+ spec.installed_by_version = Gem::VERSION
Bundler.rubygems.validate(spec)
File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
end
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 754eaa39c4..6a99f8e977 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -148,7 +148,7 @@ module Bundler
def load_gemspec(file)
return unless spec = Bundler.load_gemspec(file)
- Bundler.rubygems.set_installed_by_version(spec)
+ spec.installed_by_version = Gem::VERSION
spec
end