From 4830913ed3a9da3a66aae039fa5ead4f65b2ed9c Mon Sep 17 00:00:00 2001 From: hartator Date: Fri, 17 Feb 2017 12:54:12 -0600 Subject: [PATCH] Add explicit variable current encoding --- lib/wayback_machine_downloader.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wayback_machine_downloader.rb b/lib/wayback_machine_downloader.rb index 7d2f37e..401ba7a 100644 --- a/lib/wayback_machine_downloader.rb +++ b/lib/wayback_machine_downloader.rb @@ -201,7 +201,8 @@ def structure_dir_path dir_path end def download_file file_remote_info - file_url = file_remote_info[:file_url].encode(''.encoding) + current_encoding = "".encoding + file_url = file_remote_info[:file_url].encode(current_encoding) file_id = file_remote_info[:file_id] file_timestamp = file_remote_info[:timestamp] file_path_elements = file_id.split('/')