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

Support Hash#values_at and Hash#values #1595

Merged
merged 2 commits into from May 27, 2021
Merged

Support Hash#values_at and Hash#values #1595

merged 2 commits into from May 27, 2021

Conversation

presidentbeef
Copy link
Owner

Examples:

h = { a: 1, b: 2, c: 3 }
values = h.values   #=> [1, 2]
v[1]                #=> 2
h = { a: 1, b: 2, c: 3 }
values = h.values_at(:a, :c)  #=> [1, 3]
v[1]                          #=> 3

Also, if a hash table is all literal values, but the key is unknown (e.g. an argument), Brakeman will treat the value as a safe literal value.

@presidentbeef presidentbeef merged commit 64d6c30 into main May 27, 2021
@presidentbeef presidentbeef deleted the hash_values_at branch May 27, 2021 04:50
Repository owner locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant