-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
nokogiri Jruby does not let you move nodes from one document to another, MRI does #1773
Comments
(oops, |
I'll take a look -- we've got pretty thorough tests for reparenting nodes, but it's totally possible we've missed an edge case that affects JRuby. |
Cool, thanks, the repro is above which you can make into a test if you like. If somehow you can't repro with that script that raises for me... that'd be odd. |
pushed a fix in #1777. @flavorjones can you take a look at the PR. |
MRI nokogiri version
Jruby nokogiri version
Reproduction:
In MRI nokogiri, this works fine, and prints what you'd expect:
In JRuby nokogiri, it raises:
Surprisingly,
doc2.root = node
does seem to work without raising, JRuby nokogiri can move a node from one doc to another usingroot=
, at least.The text was updated successfully, but these errors were encountered: