lib/jsonpath/parser.rb in jsonpath-0.8.4 vs lib/jsonpath/parser.rb in jsonpath-0.8.5
- old
+ new
@@ -44,10 +44,10 @@
end
el = dig(elements, @_current_node)
return false unless el
return true if operator.nil? && el
- operand = operand.to_f if operand.to_i.to_s == operand || operand.to_f.to_s == operand
+ operand = Float(operand) rescue operand
el.send(operator.strip, operand)
end
private