lib/httparty/parsers/xml.rb in timriley-httparty-0.3.1 vs lib/httparty/parsers/xml.rb in timriley-httparty-0.3.2
- old
+ new
@@ -200,10 +200,10 @@
end
when :text, :cdata
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
end
\ No newline at end of file