Package: bundler / 1.13.6-2

do-not-add-system-path-to-RUBYLIB Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Christian Hofstaedtler <zeha@debian.org>
Date: Wed, 13 Jul 2016 15:51:52 +0000
Subject: Do not add system path to RUBYLIB

Bundler adds it's own installation path in front of RUBYLIB, but when
this is the system ruby path, this causes system-wide installed gems
to be used before bundler-installed gems.

Closes: #830958
Forwarded: not-needed
Origin: vendor
---
 lib/bundler.rb                | 6 ------
 lib/bundler/shared_helpers.rb | 3 ---
 2 files changed, 9 deletions(-)

--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -232,12 +232,6 @@
         env["RUBYOPT"] = env["RUBYOPT"].sub "-rbundler/setup", ""
       end
 
-      if env.key?("RUBYLIB")
-        rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
-        rubylib.delete(File.expand_path("..", __FILE__))
-        env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
-      end
-
       env
     end
 
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -201,9 +201,6 @@
     end
 
     def set_rubylib
-      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
-      rubylib.unshift File.expand_path("../..", __FILE__)
-      ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
     end
 
     def clean_load_path