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] Array doc #10199

Merged
merged 3 commits into from Mar 13, 2024
Merged

[DOC] Array doc #10199

merged 3 commits into from Mar 13, 2024

Conversation

BurdetteLamar
Copy link
Member

Adds section 'In brief' for Array#[]=.

@BurdetteLamar BurdetteLamar added the Documentation Improvements to documentation. label Mar 7, 2024
@BurdetteLamar
Copy link
Member Author

There may be too many examples in the new section; suggest deletions please.

@BurdetteLamar
Copy link
Member Author

I think the doc for Array#[]= may be missing the cases where the operand is an array; if so, that will be for a different PR.

@@ -2284,6 +2294,73 @@ ary_aset_by_rb_ary_splice(VALUE ary, long beg, long len, VALUE val)
*
* Assigns elements in +self+; returns the given +object+.
*
* In brief:
Copy link
Member

Choose a reason for hiding this comment

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

IMO the "in brief" section stops being useful when it tries to exhaustively cover all the cases. It becomes harder to read than the regular documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree; pared.

@BurdetteLamar
Copy link
Member Author

@peterzhu2118, will you be reviewing this? I've pared down the examples (as I suggested in the OP might be necessary).

@peterzhu2118
Copy link
Member

Sorry, I must have missed this.

@peterzhu2118 peterzhu2118 merged commit 76f9cfd into ruby:master Mar 13, 2024
25 checks passed
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements to documentation.
2 participants