diff options
Diffstat (limited to 'lib/bundler/rubygems_integration.rb')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 9df0897ca2..734ac91bd9 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -139,10 +139,20 @@ module Bundler end def inflate(obj) - if defined?(Gem::Util) - Gem::Util.inflate(obj) + require "rubygems/util" + + Gem::Util.inflate(obj) + end + + def correct_for_windows_path(path) + require "rubygems/util" + + if Gem::Util.respond_to?(:correct_for_windows_path) + Gem::Util.correct_for_windows_path(path) + elsif path[0].chr == "/" && path[1].chr =~ /[a-z]/i && path[2].chr == ":" + path[1..-1] else - Gem.inflate(obj) + path end end |