Skip to content

Commit 5c74bbf

Browse files
committed
Fix URIUills.split_file_uri compatibility with newer URI gem
1 parent 9981caf commit 5c74bbf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sprockets/uri_utils.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ def split_file_uri(uri)
5050
# Hack for parsing Windows "file:///C:/Users/IEUser" paths
5151
path.gsub!(/^\/([a-zA-Z]:)/, '\1'.freeze)
5252

53+
host = nil if host && host.empty?
54+
query = nil if query && query.empty?
55+
5356
[scheme, host, path, query]
5457
end
5558

0 commit comments

Comments
 (0)