summaryrefslogtreecommitdiff
path: root/spec/support/path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/path.rb')
-rw-r--r--spec/support/path.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb
index 28682a1f25..ca05ef5e3b 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -64,10 +64,11 @@ module Spec
def file_uri_for(path)
protocol = "file://"
+ root = Gem.win_platform? ? "/" : ""
- return protocol + "localhost" + path.to_s if RUBY_VERSION < "2.5"
+ return protocol + "localhost" + root + path.to_s if RUBY_VERSION < "2.5"
- protocol + path.to_s
+ protocol + root + path.to_s
end
def gem_repo1(*args)