Skip to content

Commit ee2c42b

Browse files
timthelionglebm
authored andcommittedAug 7, 2023
Ruby 3 doesn't allow opening URLs with open
1 parent 6b0ca50 commit ee2c42b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎tasks/converter/network.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def read_files(path, files)
1919
log_http_get_files files, full_path, false
2020
files.map do |name|
2121
Thread.start {
22-
contents[name] = open("#{full_path}/#{name}").read
22+
contents[name] = URI.open("#{full_path}/#{name}").read
2323
Thread.exclusive { write_cached_files path, name => contents[name] }
2424
}
2525
end.each(&:join)
@@ -56,7 +56,7 @@ def get_file(url)
5656
File.read(cache_path, mode: 'rb')
5757
else
5858
log_http_get_file url, false
59-
content = open(url).read
59+
content = URI.open(url).read
6060
File.open(cache_path, 'wb') { |f| f.write content }
6161
content
6262
end

0 commit comments

Comments
 (0)
Please sign in to comment.