KEMBAR78
[DOC] Adjust argument unpacking docs and document **nil by zverok · Pull Request #12228 · ruby/ruby · GitHub
Skip to content

Conversation

@zverok
Copy link
Contributor

@zverok zverok commented Dec 1, 2024

Motivation: I looked where to put the new **nil functionality (as implemented in Bug #20064) and found out that the perspective of the unpacking documentation seems to be slightly off. So I adjusted that a bit and added the #to_a/#to_hash convention, as well as the new **nil.

@zverok zverok requested a review from jeremyevans December 1, 2024 14:27
@zverok zverok self-assigned this Dec 1, 2024
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good. There are some typos that need to be fixed, and an important semantic difference that **nil does not produce an empty hash, it is just ignored and does not add keywords (it's been optimized to avoid the allocation of an unnecessary hash).

@nobu nobu added the Documentation Improvements to documentation. label Dec 2, 2024
@zverok
Copy link
Contributor Author

zverok commented Dec 2, 2024

Thank you @jeremyevans @nobu, suggestions applied 🙏

@zverok zverok requested review from jeremyevans and nobu December 2, 2024 20:01
@zverok zverok force-pushed the docs-argument-splatting branch from 1f80ee5 to c4c1825 Compare December 15, 2024 19:06
@zverok zverok merged commit 1ac2822 into ruby:master Dec 15, 2024
41 checks passed
@zverok zverok deleted the docs-argument-splatting branch December 16, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants