diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-28 08:45:27 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:55 +0900 |
commit | 81779e22469d89c38ee653e3de032144af0891f7 (patch) | |
tree | 16690d94035d45e80797be15ad2d7f18153ca7c7 /lib/bundler/rubygems_integration.rb | |
parent | e111f38f34ea6b48446a0c29e142ccf44cfff282 (diff) |
[bundler/bundler] Use rubygems utility if available
https://github.com/bundler/bundler/commit/7eccba0e52
Diffstat (limited to 'lib/bundler/rubygems_integration.rb')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 9df0897ca2..3e74acf694 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -146,6 +146,18 @@ module Bundler end 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 + path + end + end + def sources=(val) # Gem.configuration creates a new Gem::ConfigFile, which by default will read ~/.gemrc # If that file exists, its settings (including sources) will overwrite the values we |