From bbf04816fb76623c26354891d0cc9ad9bebb59af Mon Sep 17 00:00:00 2001 From: Tim Riley Date: Thu, 12 Feb 2009 17:02:09 +1100 Subject: [PATCH] reapply my fix for success responses that have empty bodies and bump the version number so I can get a new gem built. --- httparty.gemspec | 2 +- lib/httparty/parsers/xml.rb | 2 +- lib/httparty/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httparty.gemspec b/httparty.gemspec index 6971d950..3f822430 100644 --- a/httparty.gemspec +++ b/httparty.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{httparty} - s.version = "0.3.1" + s.version = "0.3.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= s.authors = ["John Nunemaker"] diff --git a/lib/httparty/parsers/xml.rb b/lib/httparty/parsers/xml.rb index dc9d04a3..377d6442 100644 --- a/lib/httparty/parsers/xml.rb +++ b/lib/httparty/parsers/xml.rb @@ -202,7 +202,7 @@ def self.parse(xml) stack.last.add_node(event[1]) unless event[1].strip.length == 0 || stack.empty? end end - stack.pop.to_hash + stack.length > 0 ? stack.pop.to_hash : {} end end end diff --git a/lib/httparty/version.rb b/lib/httparty/version.rb index a3cb8352..3012702b 100644 --- a/lib/httparty/version.rb +++ b/lib/httparty/version.rb @@ -1,3 +1,3 @@ module HTTParty #:nodoc: - Version = '0.3.1' + Version = '0.3.2' end