Skip to content

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

Merged
flavorjones merged 1 commit intomainfrom
flavorjones-fix-node-dup
Dec 10, 2024
Merged

fix: Node#dup adds the new node to the document's node cache#3363
flavorjones merged 1 commit intomainfrom
flavorjones-fix-node-dup

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
@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