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

Improve Hash#values_at docs #9955

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

j8r
Copy link
Contributor

@j8r j8r commented Nov 22, 2020

Closes #9952.

@docelic
Copy link
Contributor

docelic commented Nov 22, 2020

Hey @j8r, I was looking at the definition of methods #key_index and #values_at.

def key_index(key) 
def values_at(*indexes : K)

Both of these functions accept the key(s) as argument, not indexes.
In that context, I believe that, while you are at it, values_at should actually be fixed to say *keys rather than *indexes, right?

@straight-shoota
Copy link
Member

@docelic That's already in this PR!

@j8r
Copy link
Contributor Author

j8r commented Nov 26, 2020

That's not a breaking change, how can it be @straight-shoota ?

@straight-shoota
Copy link
Member

I probably didn't realize the argument rename doesn't have a practical relevance because it's a splat.

@asterite asterite added this to the 1.0.0 milestone Dec 8, 2020
@asterite asterite merged commit d427f79 into crystal-lang:master Dec 8, 2020
@j8r j8r deleted the improve-Hash#values_at-docs branch December 8, 2020 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hash: indexed or not (officially)?
4 participants