Skip to content

Commit

Permalink
Patching probable issue with RDF::Query#execute [fixup]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Johnson committed Aug 5, 2016
1 parent 4ad6a54 commit 2ba63f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/active_triples/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ def node_cache
##
# @private
def objects(&block)
parent.query(subject: rdf_subject, predicate: predicate)
.each_object(&block)
solutions = parent.query(subject: rdf_subject, predicate: predicate)
solutions.extend(RDF::Enumerable) unless solutions.respond_to?(:each_object)

solutions.each_object(&block)
end

private
Expand Down

0 comments on commit 2ba63f3

Please sign in to comment.