Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DOC] Tweaks for Array#rotate! #11875

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

Merged
merged 2 commits into from
Oct 11, 2024
Merged

[DOC] Tweaks for Array#rotate! #11875

merged 2 commits into from
Oct 11, 2024

Conversation

BurdetteLamar
Copy link
Member

No description provided.

@BurdetteLamar BurdetteLamar added the Documentation Improvements to documentation. label Oct 10, 2024
array.c Outdated
* a = [:foo, 'bar', 2]
* a.rotate!(20)
* a # => [2, :foo, "bar"]
* [0, 1, 2, 3].rotate!(20) # => [0, 1, 2, 3]
Copy link
Member

Choose a reason for hiding this comment

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

20 is a multiple of 4, so it ends up not demonstrating any rotation at all. Let's use something that rotates, like 19 or 21.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@peterzhu2118 peterzhu2118 merged commit 77c7d88 into ruby:master Oct 11, 2024
37 checks passed
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.

2 participants