Skip to content

Comments

skip when node size is zero#154

Merged
joshbuddy merged 1 commit intojoshbuddy:masterfrom
a5-stable:aviod-zero-division-error
May 9, 2023
Merged

skip when node size is zero#154
joshbuddy merged 1 commit intojoshbuddy:masterfrom
a5-stable:aviod-zero-division-error

Conversation

@a5-stable
Copy link
Contributor

JsonPath.on({}, "[*]")
#-> lib/jsonpath/enumerable.rb:88:in `%': divided by 0 (ZeroDivisionError)

Greetings, I got an error as above and I fixed it in this pr.
this happens when node size is zero in jsonpath enumerable.

start_idx %= node.size
end_idx %= node.size

@joshbuddy joshbuddy merged commit 9068f9b into joshbuddy:master May 9, 2023
@joshbuddy
Copy link
Owner

Thanks @a5-stable

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