From 05e5d332df4a3cea321efcbd8e4bcfa9c7af53d9 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Fri, 15 Mar 2013 12:10:22 +0900 Subject: [PATCH] These autoloads do not serve much. --- lib/http/cookie_jar.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/http/cookie_jar.rb b/lib/http/cookie_jar.rb index 7e8b04d..fb0082b 100644 --- a/lib/http/cookie_jar.rb +++ b/lib/http/cookie_jar.rb @@ -5,8 +5,8 @@ require 'http/cookie' # any particular website. class HTTP::CookieJar - autoload :AbstractSaver, 'http/cookie_jar/abstract_saver' - autoload :AbstractStore, 'http/cookie_jar/abstract_store' + require 'http/cookie_jar/abstract_store' + require 'http/cookie_jar/abstract_saver' attr_reader :store @@ -136,7 +136,7 @@ class HTTP::CookieJar begin saver = AbstractSaver.implementation(opthash[:format]).new(opthash) - rescue KeyError => e + rescue IndexError => e raise ArgumentError, e.message end @@ -197,7 +197,7 @@ class HTTP::CookieJar begin saver = AbstractSaver.implementation(opthash[:format]).new(opthash) - rescue KeyError => e + rescue IndexError => e raise ArgumentError, e.message end