Skip to content

Commit 9da87bf

Browse files
committed
Make URI#open cross Ruby versions compatible
Inspired-by: commit 30475c5
1 parent 66ff4d9 commit 9da87bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/wayback_machine_downloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def download_file file_remote_info
268268
structure_dir_path dir_path
269269
open(file_path, "wb") do |file|
270270
begin
271-
URI.open("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
271+
URI("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}").open("Accept-Encoding" => "plain") do |uri|
272272
file.write(uri.read)
273273
end
274274
rescue OpenURI::HTTPError => e

0 commit comments

Comments
 (0)