lib/httpx/transcoder.rb in httpx-0.22.3 vs lib/httpx/transcoder.rb in httpx-0.22.4
- old
+ new
@@ -71,10 +71,10 @@
params
end
def params_hash_has_key?(hash, key)
- return false if /\[\]/.match?(key)
+ return false if key.include?("[]")
key.split(/[\[\]]+/).inject(hash) do |h, part|
next h if part == ""
return false unless h.is_a?(Hash) && h.key?(part)