1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Switch has_key to more ruby-ish key method

This commit is contained in:
John Nunemaker 2016-01-13 16:42:39 -05:00
parent 41d0477f1f
commit 9eb5a7963d
2 changed files with 2 additions and 2 deletions

View file

@ -543,7 +543,7 @@ module HTTParty
private
def ensure_method_maintained_across_redirects(options)
unless options.has_key? :maintain_method_across_redirects
unless options.key?(:maintain_method_across_redirects)
options[:maintain_method_across_redirects] = true
end
end

View file

@ -76,7 +76,7 @@ module HTTParty
def connection
host = clean_host(uri.host)
port = uri.port || (uri.scheme == 'https' ? 443 : 80)
if options.has_key?(:http_proxyaddr)
if options.key?(:http_proxyaddr)
http = Net::HTTP.new(host, port, options[:http_proxyaddr], options[:http_proxyport], options[:http_proxyuser], options[:http_proxypass])
else
http = Net::HTTP.new(host, port)