Skip to content

Commit a889ba9

Browse files
committed
Add check to see if subject implements supports? before using it, which isn't the case for a Writer.
1 parent fcde800 commit a889ba9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rdf/mixin/writable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def insert_statements(statements)
130130
if statement.embedded? && respond_to?(:supports?) && !supports?(:quoted_triples)
131131
raise ArgumentError, "Writable does not support quoted triples"
132132
end
133-
if statement.object && statement.object.literal? && statement.object.direction? && !supports?(:base_direction)
133+
if statement.object && statement.object.literal? && statement.object.direction? && respond_to?(:supports?) && !supports?(:base_direction)
134134
raise ArgumentError, "Writable does not support directional languaged-tagged strings"
135135
end
136136
insert_statement(statement)

0 commit comments

Comments
 (0)