Skip to content

Commit 1519d66

Browse files
committed
Correct usage of Nokogiri::Element.new to pass a document, not a node as the second argument per deprecation notice.
1 parent afe8508 commit 1519d66

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
ruby:
2424
- 2.6
2525
- 2.7
26-
- 3.0
26+
- "3.0"
2727
- 3.1
2828
- ruby-head
2929
- jruby

lib/rdf/rdfxml/reader/nokogiri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(node, parent = nil)
2525

2626
# Create a new element child of an existing node
2727
def create_node(name, children)
28-
native = ::Nokogiri::XML::Element.new(name, @node)
28+
native = ::Nokogiri::XML::Element.new(name, @node.document)
2929
children.each do |c|
3030
native.add_child(c.node)
3131
end

0 commit comments

Comments
 (0)