Skip to content

Commit 2a94ae5

Browse files
committed
Don't parse quoted triples when validating.
1 parent 6e55907 commit 2a94ae5

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/rdf/mixin/enumerable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def to_a
8484
# * `:validity` allows a concrete Enumerable implementation to indicate that it does or does not support valididty checking. By default implementations are assumed to support validity checking.
8585
# * `:skolemize` supports [Skolemization](https://www.w3.org/wiki/BnodeSkolemization) of an `Enumerable`. Implementations supporting this feature must implement a `#skolemize` method, taking a base URI used for minting URIs for BNodes as stable identifiers and a `#deskolemize` method, also taking a base URI used for turning URIs having that prefix back into the same BNodes which were originally skolemized.
8686
# * `:rdf_full` supports RDF 1.2 Full profile, including support for embedded Triple Terms.
87-
# * `:quoted_triples` supports RDF-star quoted triples.
87+
# * `:quoted_triples` supports RDF-star quoted triples. (DEPRECATED)
8888
# * `:base_direction` supports RDF 1.2 directional language-tagged strings.
8989
#
9090
# @param [Symbol, #to_sym] feature

lib/rdf/ntriples/reader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ def read_tripleTerm
259259

260260
##
261261
# @return [RDF::Statement]
262-
# @deprecated Quoted triples are now deprecated
262+
# @deprecated Quoted triples are now deprecated (not supported when validating)
263263
def read_quotedTriple
264-
if @options[:rdfstar] && !match(TT_START) && match(QT_START)
264+
if @options[:rdfstar] && !match(TT_START) && match(QT_START) && !validate?
265265
warn "[DEPRECATION] RDF-star quoted triples are deprecated and will be removed in a future version.\n" +
266266
"Called from #{Gem.location_of_caller.join(':')}"
267267
subject = read_uriref || read_node || read_quotedTriple || fail_subject

lib/rdf/repository.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def supports?(feature)
273273
when :literal_equality then true
274274
when :atomic_write then true
275275
when :rdf_full then true
276-
when :quoted_triples then true
276+
when :quoted_triples then true # DEPRECATED
277277
when :base_direction then true
278278
when :snapshots then true
279279
else false

0 commit comments

Comments
 (0)