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

[DOC] Adjust doc for rb_ary_new_capa #10774

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zzak
Copy link
Member

@zzak zzak commented May 15, 2024

  • "Designed capacity of the generating array" becomes:
    • "Desired capacity of the array"
  • "this could be effective than" becomes:
    • "this could be more efficient than"
  • I'm not sure what "how many rooms of objects it allocates" means.
    • Instead use "the capa parameter to specify the length of the array."
    • This is not to be confused with the Array#length...
  • Removed excess spaces mid-sentence
    • /cc @shyouhei who added these, I'm not sure if it was intentional?

* "Designed capacity of the generating array" becomes:
  * "Desired capacity of the array"
* "this could be effective than" becomes:
  * "this could be more efficient than"
* I'm not sure what "how many rooms of objects it allocates" means.
  * Instead use "the `capa` parameter to specify the length of the array."
  * This is not to be confused with the `Array#length`...
* Removed excess spaces mid-sentence
@zzak
Copy link
Member Author

zzak commented May 15, 2024

Ahh, I realized the spaces are because the text is meant to be justified to 80 characters. 🤔

Copy link
Member

@shyouhei shyouhei left a comment

Choose a reason for hiding this comment

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

The spaces were done using Emacs for aesthetics reasons only. You can safely remove them.

Comment on lines +80 to +84
* Identical to rb_ary_new(), except it accepts the `capa` parameter to specify
* the length of the array.
*
* @param[in] capa Designed capacity of the generating array.
* This way you can create an array whose capacity is bigger than the length of
* it. If you can say that an array grows to a specific amount, this could be
Copy link
Member

Choose a reason for hiding this comment

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

"The length" that appear twice in this part seems something different each other. It is confusing to non-native English speakers like me.

@zzak zzak marked this pull request as draft May 16, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants