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

limit(0; is broken #2316

Closed
ajmalton opened this issue May 21, 2021 · 2 comments
Closed

limit(0; is broken #2316

ajmalton opened this issue May 21, 2021 · 2 comments
Labels

Comments

@ajmalton
Copy link

limit(0;range(10)) yields 0

I tried this on jq-1.6 on two platforms, and also on jqplay.

It ought to be empty, of course.

@vintnes
Copy link

vintnes commented May 21, 2021

Fixed on master

$ jq --version; jq -n 'limit(0; range(1))'
jq-1.6
0

$ jq/jq --version; jq/jq -n 'limit(0; range(1))'
jq-1.6-137-gd18b2d0-dirty

@itchyny itchyny added the bug label Jun 3, 2023
@pkoppstein
Copy link
Contributor

Fixed by Commit 9a0d5be

wader added a commit to wader/jaq that referenced this issue Sep 24, 2024
`[[]] | implode` crash was fixed in 1.7 by jqlang/jq#2646
`[limit(0; 1, 2, 3)]` yielding 1,2 instead of nothing fixed in 1.7 by jqlang/jq#2316
`limit/2` will throw error on negative limit once jqlang/jq#3181 is merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants