Skip to content

Commit 30475c5

Browse files
committed
Make URI#open cross Ruby versions compatible
1 parent ba4ca60 commit 30475c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/wayback_machine_downloader/archive_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_raw_list_from_api url, page_index
1010
request_url.query = URI.encode_www_form(params)
1111

1212
begin
13-
json = JSON.parse(URI.open(request_url).read)
13+
json = JSON.parse(URI(request_url).open.read)
1414
if (json[0] <=> ["timestamp","original"]) == 0
1515
json.shift
1616
end

0 commit comments

Comments
 (0)