mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
raise appropriate error message if .plugin called with odd second parameter
This commit is contained in:
parent
9c62f46189
commit
b00f8575d7
@ -171,6 +171,8 @@ module HTTPX
|
||||
end
|
||||
|
||||
def merge(other)
|
||||
raise ArgumentError, "#{other.inspect} is not a valid set of options" unless other.respond_to?(:to_hash)
|
||||
|
||||
h2 = other.to_hash
|
||||
return self if h2.empty?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user