1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Remove seemingly unnecessary code

f5dd5204ca
This commit is contained in:
David Rodríguez 2022-05-27 21:08:14 +02:00 committed by git
parent 7976142791
commit 0a974e4700

View file

@ -38,12 +38,6 @@ def gemfile(install = false, options = {}, &gemfile)
raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
begin
old_root = Bundler.method(:root)
bundler_module = class << Bundler; self; end
bundler_module.send(:remove_method, :root)
def Bundler.root
Bundler::SharedHelpers.pwd.expand_path
end
old_gemfile = ENV["BUNDLE_GEMFILE"]
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
@ -71,11 +65,6 @@ def gemfile(install = false, options = {}, &gemfile)
runtime.setup.require
end
ensure
if bundler_module
bundler_module.send(:remove_method, :root)
bundler_module.send(:define_method, :root, old_root)
end
if old_gemfile
ENV["BUNDLE_GEMFILE"] = old_gemfile
else