summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-05-13 13:35:13 +0200
committergit <svn-admin@ruby-lang.org>2024-09-10 02:50:46 +0000
commitd6baa6258c394df9ef54282bc738a326396e06ab (patch)
treed97adc45ac6df5c60f043a187397c2f547eee5b7
parent88723dd5a5a27bb0bc244c7b20223ca99f917fd6 (diff)
[rubygems/rubygems] Avoid having to redefine `Definition#lock` in inline mode
https://github.com/rubygems/rubygems/commit/0b7be7bb77 Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--lib/bundler/inline.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 5471a72fdd..83db5c0d64 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -519,7 +519,7 @@ module Bundler
end
def write_lock(file, preserve_unknown_sections)
- return if Definition.no_lock
+ return if Definition.no_lock || file.nil?
contents = to_lock
diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index ae4ccf2138..edd2987d20 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -50,7 +50,6 @@ def gemfile(install = false, options = {}, &gemfile)
Bundler.settings.temporary(deployment: false, frozen: false) do
definition = builder.to_definition(nil, true)
- def definition.lock(*); end
definition.validate_runtime!
if install || definition.missing_specs?