class method
Gem::Util.correct_for_windows_path
correct_for_windows_path(path)
lib/rubygems/util.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/util.rb, line 89
def self.correct_for_windows_path(path)
if path[0].chr == "/" && path[1].chr.match?(/[a-z]/i) && path[2].chr == ":"
path[1..-1]
else
path
end
end
Corrects path (usually returned by ‘Gem::URI.parse().path` on Windows), that comes with a leading slash.