Skip to content

Commit

Permalink
Update lib/jmespath/nodes/condition.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Ezra Jennings <ejennings@mdsol.com>
  • Loading branch information
mullermp and ejennings-mdsol committed Nov 18, 2022
1 parent fbb7ff4 commit 57d77ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/jmespath/nodes/condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def visit(_value)

def comparable?(left_value, right_value)
if COMPARABLE_TYPES.include?(left_value.class) && COMPARABLE_TYPES.include?(right_value.class)
return true if left_value.class == right_value.class
return true if left_value.is_a?(Numeric) && right_value.is_a?(Numeric)
(left_value.class == right_value.class) || (left_value.is_a?(Numeric) && right_value.is_a?(Numeric))
end
end
end
Expand Down

0 comments on commit 57d77ea

Please sign in to comment.