summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-10-30 11:09:37 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-05 10:28:29 +0100
commit0698cb1519f4ddad388024cea83867f339219b4c (patch)
treed9d957af74f3ba1aabb7a62e1bfa9eb70487a2bf
parent674966e21cc7257dd52797ef56ee9628c3ce1bc6 (diff)
downloadbundler-remove_unnecessary_load_path_manipulation.tar.gz
Remove unnecessary lines from `bundler/setup`remove_unnecessary_load_path_manipulation
Bundler no longer needs to be in the `$LOAD_PATH` once a version of itself has been loaded. In any case, the `Metadata` source takes care of adding `bundler` to the index: https://github.com/bundler/bundler/blob/e70643c1be3a4417bd537d7e63470265465e693e/lib/bundler/source/metadata.rb#L13-L30 and then that spec is added to the resolution here: https://github.com/bundler/bundler/blob/e70643c1be3a4417bd537d7e63470265465e693e/lib/bundler/definition.rb#L180-L184 And from the resulting set of specs, the `$LOAD_PATH` is setup: https://github.com/bundler/bundler/blob/e70643c1be3a4417bd537d7e63470265465e693e/lib/bundler/runtime.rb#L25-L38 So `bundler` will be present in the `$LOAD_PATH` anyways, and the lines being removed here will never be useful.
-rw-r--r--lib/bundler/setup.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index b9a2f8f1da..70a0968f4b 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -19,8 +19,4 @@ if Bundler::SharedHelpers.in_bundle?
else
Bundler.ui.silence { Bundler.setup }
end
-
- # Add bundler to the load path after disabling system gems
- bundler_lib = File.expand_path("../..", __FILE__)
- $LOAD_PATH.unshift(bundler_lib) unless $LOAD_PATH.include?(bundler_lib)
end