Add default encoding to UFT-8 for Ruby < 2 and Ruby

This commit is contained in:
hartator 2015-11-05 16:44:41 -06:00
parent 44924d0f5c
commit ed7948a372

View File

@ -1,3 +1,5 @@
# encoding: UTF-8
require 'open-uri'
require 'fileutils'
require_relative 'wayback_machine_downloader/tidy_bytes'
@ -27,11 +29,6 @@ class WaybackMachineDownloader
file_list_curated = Hash.new
[index_file_list_raw, all_file_list_raw].each do |file|
file.each_line do |line|
line = line.tidy_bytes
unless line
puts "Malformed line, ignoring."
next
end
line = line.split(' ')
file_timestamp = line[1].to_i
file_url = line[2]