On this page
class Bundler::RubygemsIntegration::AlmostModern
RubyGems 1.8.0 to 1.8.4
Public Instance Methods
# File lib/bundler/rubygems_integration.rb, line 707
def preserve_paths
old_dir = gem_dir
old_path = gem_path
yield
Gem.use_paths(old_dir, old_path)
end
RubyGems [>= 1.8.0, < 1.8.5] has a bug that changes Gem.dir whenever you call Gem::Installer#install
with an :install_dir set. We have to change it back for our sudo mode to work.
Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.