From 1311dec8a37242ae727cd9ed43ca17cb178cb859 Mon Sep 17 00:00:00 2001 From: Jessica Dillon & Jessica Lynn Suttles Date: Mon, 1 Jul 2013 18:31:25 -0700 Subject: [PATCH] removes saved headers from param defaults --- lib/microformats2/parser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/microformats2/parser.rb b/lib/microformats2/parser.rb index 8f9383b..4a3d13d 100644 --- a/lib/microformats2/parser.rb +++ b/lib/microformats2/parser.rb @@ -6,13 +6,13 @@ module Microformats2 @http_headers = {} end - def parse(html, headers=@http_headers) + def parse(html, headers={}) html = read_html(html, headers) document = Nokogiri::HTML(html) Collection.new(document).parse end - def read_html(html, headers=@http_headers) + def read_html(html, headers={}) open(html, headers) do |response| @http_headers = response.meta if response.respond_to?(:meta) @http_body = response.read