-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
{XML,HTML4,HTML5}::{Document,DocumentFragment}{.parse,#initialize} take keyword arguments #3355
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using `...` in Ruby is so much easier (and more efficient) than the equivalent code written in the C extension, and allows us to introduce very flexible initializer parameters (like kwargs).
This was referenced Dec 8, 2024
and delete some unused code.
Related to #3323 This commit was merged and expanded from #3336, thank you @MattJones! Co-authored-by: Matt Jones <[email protected]>
Related to #3323 This commit was merged and expanded from #3335, thank you @infews! Co-authored-by: Davis W. Frank <[email protected]>
and improve the documentation Part of #3323
and adding some TODOs
flavorjones
force-pushed
the
flavorjones-kwarg-doc-and-docfrag
branch
from
December 8, 2024 15:44
2da0c10
to
ac9fb8a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem is this PR intended to solve?
As part of #3323 there were a few RubyConf 2024 Hack Day pull requests addressing Document and DocumentFragment constructors which were related to, or blocked on, some changes to the C code.
So this PR is a mega-PR that merges all those PRs and unifies the code and doc style:
But in addition to those PRs also updates:
XML::DocumentFragment
new/initialize argument handling for CRuby and JRubyXML::DocumentFragment#initialize
kwargsHTML4::Document.parse
kwargsHave you included adequate test coverage?
I think so!
Does this change affect the behavior of either the C or the Java implementations?
The XML::DocumentFragment allocator has changed, but both implementations have been updated.