lib/togostanza/stanza/querying.rb in togostanza-2.2.1 vs lib/togostanza/stanza/querying.rb in togostanza-2.2.2

- old
+ new

@@ -15,13 +15,15 @@ text_or_filename = Tilt.new(path).render(data) end client = SPARQL::Client.new(MAPPINGS[endpoint] || endpoint, method: 'get') - client.query(text_or_filename, **{content_type: 'application/sparql-results+json'}.merge(options)).map {|binding| + result = client.query(text_or_filename, **{content_type: 'application/sparql-results+json'}.merge(options)).map {|binding| binding.each_with_object({}) {|(name, term), hash| hash[name] = term.to_s } } + client.close + result end end end