We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f193b06 commit 19bc436Copy full SHA for 19bc436
1 file changed
Gemfile
@@ -4,7 +4,18 @@ def location_for(place)
4
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
5
[{ :git => $1, :branch => $2, :require => false }]
6
elsif place =~ /^file:\/\/(.*)/
7
- ['>= 0', { :path => File.expand_path($1), :require => false }]
+ raw_path = $1
8
+
9
+ expanded_path =
10
+ if Gem.win_platform?
11
+ normalized = raw_path.sub(%r{^/([A-Za-z]:/)}, '\1')
12
+ normalized = normalized.tr('/', '\\')
13
+ File.expand_path(normalized)
14
+ else
15
+ File.expand_path(raw_path)
16
+ end
17
18
+ ['>= 0', { :path => expanded_path, :require => false }]
19
else
20
[place, { :require => false }]
21
end
0 commit comments