lib/shex/algebra/one_of.rb in shex-0.6.3 vs lib/shex/algebra/one_of.rb in shex-0.6.4

- old
+ new

@@ -63,25 +63,15 @@ matched: results, unmatched: ((arcs_in + arcs_out).uniq - results), satisfied: satisfied, unsatisfied: unsatisfied, depth: depth end ## - # expressions must be TripleExpressions + # expressions must be TripleExpressions or references to TripleExpressions # # @return [Operator] `self` # @raise [ShEx::StructureError] if the value is invalid def validate! - expressions.each do |op| - case op - when TripleExpression - when RDF::Resource - ref = schema.find(op) - ref.is_a?(TripleExpression) || - structure_error("#{json_type} must reference a TripleExpression: #{ref}") - else - structure_error("#{json_type} must reference a TripleExpression: #{ref}") - end - end + validate_expressions! super end end end