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

fix: Node#dup adds the new node to the document's node cache #3363

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

Node#dup adds the new node to the document's node cache to make sure it's marked properly. Fixes #3359.

Also, we make sure the new node is decorated if necessary with its document's decorators.

Have you included adequate test coverage?

Yes! HUGE thanks to @byroot for doing the work to create a tight reproduction. 🙇

Does this change affect the behavior of either the C or the Java implementations?

Both bugfixes affect the C implementation only.

to make sure it's marked properly. Also, we make sure the new node is
decorated if necessary with its document's decorators.

Fixes #3359

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
@flavorjones flavorjones force-pushed the flavorjones-fix-node-dup branch from c06a980 to c72503a Compare December 10, 2024 13:50
@flavorjones flavorjones merged commit 04f2210 into main Dec 10, 2024
133 checks passed
@flavorjones flavorjones deleted the flavorjones-fix-node-dup branch December 10, 2024 14:26
flavorjones added a commit that referenced this pull request Dec 10, 2024
byroot added a commit to rails/rails that referenced this pull request Dec 12, 2024
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 this pull request may close these issues.

Potential GC Bug in Nokogiri 1.17.0
1 participant