lib/splunk_client/splunk_results.rb in splunk-client-0.8.0 vs lib/splunk_client/splunk_results.rb in splunk-client-0.8.1

- old
+ new

@@ -14,9 +14,13 @@ return @results if rawResults.strip.empty? nokoResults = Nokogiri::Slop(rawResults) + if ((nokoResults.children.first.children.nil?) ||(nokoResults.children.first.children.count == 0)) + return @results + end + if nokoResults.results.result.respond_to?("length") # Multiple Results, build array nokoResults.results.result.each do |resultObj| @results.push SplunkResult.new(resultObj) end