Skip to content

Commit

Permalink
Add check to see if subject implements supports? before using it, w…
Browse files Browse the repository at this point in the history
…hich isn't the case for a Writer.
  • Loading branch information
gkellogg committed Oct 31, 2023
1 parent fcde800 commit a889ba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdf/mixin/writable.rb
Expand Up @@ -130,7 +130,7 @@ def insert_statements(statements)
if statement.embedded? && respond_to?(:supports?) && !supports?(:quoted_triples)
raise ArgumentError, "Writable does not support quoted triples"
end
if statement.object && statement.object.literal? && statement.object.direction? && !supports?(:base_direction)
if statement.object && statement.object.literal? && statement.object.direction? && respond_to?(:supports?) && !supports?(:base_direction)
raise ArgumentError, "Writable does not support directional languaged-tagged strings"
end
insert_statement(statement)
Expand Down

0 comments on commit a889ba9

Please sign in to comment.