Skip to content

Commit 90bf522

Browse files
committed
Don't check for valid list unless subject is a BNode.
This avoids DEPRECATION warning, and addresses issue #30.
1 parent e127b96 commit 90bf522

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/rdf/rdfxml/writer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def render_property(predicate, objects, options = {}, &block)
230230

231231
# Separate out the objects which are lists and render separately
232232
lists = objects.
233+
select(&:node?).
233234
map {|o| RDF::List.new(o, @graph)}.
234235
select {|l| l.valid? && l.none?(&:literal?)}
235236

spec/writer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
111111
end
112112
end
113113

114-
context "with children", focus: true do
114+
context "with children" do
115115
subject do
116116
@graph << [RDF::URI.new("http://release/"), RDF.type, FOO.Release]
117117
@graph << [RDF::URI.new("http://release/"), RDF::DC.title, "foo"]

0 commit comments

Comments
 (0)