Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.new should be type-checking the second argument (must be a Document) #975

Closed
flavorjones opened this issue Oct 3, 2013 · 1 comment · Fixed by #2401
Closed

Node.new should be type-checking the second argument (must be a Document) #975

flavorjones opened this issue Oct 3, 2013 · 1 comment · Fixed by #2401

Comments

@flavorjones
Copy link
Member

See https://groups.google.com/forum/#!topic/nokogiri-talk/waiXL2kB3j4 for original question.

flavorjones added a commit that referenced this issue Dec 24, 2021
It must be a Node, it should be a Document (and a warning will be
emitted if it is not).

Closes #975
@flavorjones
Copy link
Member Author

See #2401, should be fixed in v1.13.0

flavorjones added a commit that referenced this issue Dec 24, 2021
It must be a Node, it should be a Document (and a warning will be
emitted if it is not).

Closes #975
javierjulio added a commit to jackpocket/worldpay-cnp that referenced this issue Jan 27, 2022
This fixes the following deprecation warning:

```
worldpay_cnp-0.1.0/lib/worldpay_cnp/xml/nokogiri.rb:36: warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
```

We are now passing the document along with the parent element. The serializer will handle the case of setting the parent to the document, when the parent is nil due to the recursive nature of the method calls.

This deprecation was included in release 1.13.0 https://github.com/sparklemotion/nokogiri/releases/tag/v1.13.0

For reference: sparklemotion/nokogiri#975 and sparklemotion/nokogiri#2401
bilbof pushed a commit to alphagov/slimmer that referenced this issue Jan 31, 2022
Nokogiri warning:
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.

See 1.13.0 Nokogiri deprecation notice:
https://nokogiri.org/CHANGELOG.html#deprecated
"Passing a Nokogiri::XML::Node as the second parameter to Node.new is deprecated and will generate a warning. This parameter should be a kind of Nokogiri::XML::Document. This will become an error in a future version of Nokogiri. [#975]"
sparklemotion/nokogiri#975
bilbof pushed a commit to alphagov/slimmer that referenced this issue Jan 31, 2022
Nokogiri warning:
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.

See 1.13.0 Nokogiri deprecation notice:
https://nokogiri.org/CHANGELOG.html#deprecated
"Passing a Nokogiri::XML::Node as the second parameter to Node.new is deprecated and will generate a warning. This parameter should be a kind of Nokogiri::XML::Document. This will become an error in a future version of Nokogiri. [#975]"
sparklemotion/nokogiri#975
bilbof pushed a commit to alphagov/slimmer that referenced this issue Jan 31, 2022
Nokogiri warning:
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.

See 1.13.0 Nokogiri deprecation notice:
https://nokogiri.org/CHANGELOG.html#deprecated
"Passing a Nokogiri::XML::Node as the second parameter to Node.new is deprecated and will generate a warning. This parameter should be a kind of Nokogiri::XML::Document. This will become an error in a future version of Nokogiri. [#975]"
sparklemotion/nokogiri#975
mishina2228 added a commit to mishina2228/gollum-lib that referenced this issue Mar 25, 2022
Nokogiri warning:

```
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
```

Please see the following for more details:
sparklemotion/nokogiri#975
benjaminwil pushed a commit to gollum/gollum-lib that referenced this issue May 1, 2022
* Fix Nokogiri deprecation warning

Nokogiri warning:

```
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
```

Please see the following for more details:
sparklemotion/nokogiri#975

* Require 'mocha/test_unit' instead of 'mocha/setup'

Suppress the following deprecation warning:

```
Mocha deprecation warning at /home/runner/work/gollum-lib/gollum-lib/test/helper.rb:9:in `require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant