-
-
Notifications
You must be signed in to change notification settings - Fork 897
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#replace fails after duping in jruby #1060
Comments
Signed-off-by: Jake Byman <jakebyman@yahoo.com>
Signed-off-by: Jake Byman <jakebyman@yahoo.com>
see WIP at branch edit 2019-01-12: branch deleted because it's irrelevant given investigation results below |
Narrowed this down to this failing test: describe "XML::Document#dup" do
it "should greate a document whose children point to itself" do
html = "<html><head></head><body><div>replace me</div></body></html>"
doc = Nokogiri::XML::Document.parse(html)
dup = doc.dup
assert_same dup, dup.at_css('div').document
# should not raise an exception
dup.at_css('div').parse('<div>replaced</div>')
end
end
describe "HTML::Document#dup" do
it "should greate a document whose children point to itself" do
html = "<html><head></head><body><div>replace me</div></body></html>"
doc = Nokogiri::HTML::Document.parse(html)
dup = doc.dup
assert_same dup, dup.at_css('div').document
# should not raise an exception
dup.at_css('div').parse('<div>replaced</div>')
end
end |
@jvshahid I think the root problem here is that the JRuby impl doesn't implement |
I just got back from vacation. I will take a look in the next few days. |
@jvshahid ❤️ |
Reproducible with code below -- works fine in MRI and Rubinius.
The text was updated successfully, but these errors were encountered: