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

Fix docs for Array#sort and Array#sort! [ci skip] #1628

Closed
wants to merge 1 commit into from

Conversation

repinel
Copy link

@repinel repinel commented May 23, 2017

For better understanding, the block documentation should use x and y
(not a and b) to match the example given bellow.

@drbrain
Copy link
Member

drbrain commented May 23, 2017

Can you make call-seq, text, and example all match?

Previously call-seq and text matched, with your current change text and example match.

@repinel
Copy link
Author

repinel commented May 23, 2017

@drbrain Sorry, it should all match now. Thanks for catching it.

@stomar
Copy link
Contributor

stomar commented May 23, 2017

Using |a, b| is very common for similar methods in various classes. So I think it would be definitely better (and simpler) to change x, y in the example to a, b.

(Personally, I don't think the example necessarily has to match the call-seq and text---in Ruby the block variables can be named arbitrarily of course---but it wouldn't hurt if they do.)

@stomar
Copy link
Contributor

stomar commented Jun 3, 2017

@repinel If you want to provide an updated commit I'll apply it.

@stomar stomar self-assigned this Jun 3, 2017
For better understanding, the example should use `a` and `b`
(not `x` and `y`) to match the documentation above.
@repinel
Copy link
Author

repinel commented Jun 3, 2017

@stomar What do you think of change?

@hsbt hsbt closed this in 7c8a060 Jun 3, 2017
@stomar
Copy link
Contributor

stomar commented Jun 3, 2017

Thanks for the update; the variables where switched, though, but I fixed it in the commit.

@repinel
Copy link
Author

repinel commented Jun 5, 2017

Thanks

@repinel repinel deleted the fix-array-sort-docs branch June 5, 2017 12:15
matzbot pushed a commit that referenced this pull request Jul 15, 2017
[ci skip][Fix GH-1628]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
znz added a commit to znz/doctree that referenced this pull request Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants