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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fetch from both arrays and hashes #1589

Merged
merged 2 commits into from May 9, 2021
Merged

Conversation

presidentbeef
Copy link
Owner

Attempt to fetch values from arrays/hashes based on key provided in fetch, if possible. But does not use the default value.

If the array or hash has all literal values but the key is unknown (e.g. a variable we don't know the value of), returns a safe literal instead. This was already in place for Hash#[] but somehow not Array#[] 馃

Fixes one of the issues from #1571

@presidentbeef presidentbeef merged commit e13aa29 into main May 9, 2021
@presidentbeef presidentbeef deleted the array_hash_fetch branch May 9, 2021 19:38
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