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 array indexing by empty array and refactor indices/1 #238

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Nov 23, 2022

This PR fixes array indexing by array ([1,2,3,2,1] | .[[]] should emit []). This operation behaves the same as indices/1 function. I looked into the function implementation and refactored a bit.

@eiiches
Copy link
Owner

eiiches commented Dec 4, 2022

Thanks for the PR and sorry for the late response. I'll take a look tomorrow, please give me a bit more time 🙏

@eiiches
Copy link
Owner

eiiches commented Dec 6, 2022

I checked the jq behavior and you are totally right. Thank you for fixing this!

@eiiches eiiches merged commit 613f3ff into eiiches:develop/1.x Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants