You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gem seems to deviate from the jq binary with regards to the return type of certain queries. Specifically, arrays are wrapping the return value in a number of situations.
Line 22 of spec/jq_spec.rb has
expect(JQ('"Zzz"').search('.')).to eq(['Zzz'])
But running the same query with the jq binary gives
echo '"Zzz"' | jq '.'
# "Zzz"
Why is the addition of the array the appropriate behaviour?
The text was updated successfully, but these errors were encountered:
(jq is an awesome tool, and I'm very happy this gem exists - 🙏 thank you @winebarrel! - and I'd very like to use it in my projects, I just can't make sense of this behaviour ...)
This gem seems to deviate from the jq binary with regards to the return type of certain queries. Specifically, arrays are wrapping the return value in a number of situations.
Line 22 of spec/jq_spec.rb has
But running the same query with the
jq
binary givesWhy is the addition of the array the appropriate behaviour?
The text was updated successfully, but these errors were encountered: