summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsing-Hui Hsu <hsing-hui@carezone.com>2016-02-07 22:51:51 -0800
committerHsing-Hui Hsu <hsing-hui@carezone.com>2016-02-07 22:51:51 -0800
commite37927b30ed3677447ada1c53725b15db866f12a (patch)
tree299c6d069a0f611651ba578cb1d71518ee447030
parentee689f171060ee35f0ea863ef03f19a3a5b2c545 (diff)
downloadbundler-e37927b30ed3677447ada1c53725b15db866f12a.tar.gz
Wrap Gem method as rubygems integration
-rw-r--r--lib/bundler/rubygems_integration.rb4
-rw-r--r--lib/bundler/runtime.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index c8ebe2cb9a..0f567db12a 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -35,6 +35,10 @@ module Bundler
Gem::Command.build_args = args
end
+ def load_path_insert_index
+ Gem.load_path_insert_index
+ end
+
def loaded_specs(name)
Gem.loaded_specs[name]
end
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 0b1e5f92b5..b1e6930e57 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -39,7 +39,7 @@ module Bundler
load_paths = spec.load_paths.reject {|path| $LOAD_PATH.include?(path) }
# See Gem::Specification#add_self_to_load_path (since RubyGems 1.8)
- insert_index = Gem.load_path_insert_index
+ insert_index = Bundler.rubygems.load_path_insert_index
if insert_index
# Gem directories must come after -I and ENV['RUBYLIB']