[前][次][番号順一覧][スレッド一覧]

ruby-changes:72016

From: David <ko1@a...>
Date: Mon, 30 May 2022 17:42:53 +0900 (JST)
Subject: [ruby-changes:72016] 0a974e4700 (master): [rubygems/rubygems] Remove seemingly unnecessary code

https://git.ruby-lang.org/ruby.git/commit/?id=0a974e4700

From 0a974e4700e123af507257a8252ac5b1f76e8c10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 27 May 2022 21:08:14 +0200
Subject: [rubygems/rubygems] Remove seemingly unnecessary code

https://github.com/rubygems/rubygems/commit/f5dd5204ca
---
 lib/bundler/inline.rb | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index a718418fce..db1ca2de65 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -38,12 +38,6 @@ def gemfile(install = false, options = {}, &gemfile) https://github.com/ruby/ruby/blob/trunk/lib/bundler/inline.rb#L38
   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) https://github.com/ruby/ruby/blob/trunk/lib/bundler/inline.rb#L65
       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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]