lib/rdf/isomorphic.rb in rdf-isomorphic-0.1.1 vs lib/rdf/isomorphic.rb in rdf-isomorphic-0.1.2

- old
+ new

@@ -30,10 +30,12 @@ # repository_a.bijection_to repository_b # @param other [RDF::Enumerable] # @return [Hash, nil] def bijection_to(other) - grounded_stmts_match = each_statement.all? do | stmt | + grounded_stmts_match = (size == other.size) + + grounded_stmts_match &&= each_statement.all? do | stmt | stmt.has_blank_nodes? || other.has_statement?(stmt) end if grounded_stmts_match # blank_stmts and other_blank_stmts are just a performance