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

Mitigates Style/AndOr

This commit is contained in:
Thomas Nys 2015-04-18 13:41:48 +02:00
parent 9ed12bd761
commit 1c9e129fc4
2 changed files with 3 additions and 3 deletions

View file

@ -84,11 +84,11 @@ module Net
end
def opaque_present?
@response.has_key?('opaque') and !@response['opaque'].empty?
@response.has_key?('opaque') && !@response['opaque'].empty?
end
def qop_present?
@response.has_key?('qop') and !@response['qop'].empty?
@response.has_key?('qop') && !@response['qop'].empty?
end
def random

View file

@ -263,7 +263,7 @@ module HTTParty
self.path = last_response['location']
self.redirect = true
if last_response.class == Net::HTTPSeeOther
unless options[:maintain_method_across_redirects] and options[:resend_on_redirect]
unless options[:maintain_method_across_redirects] && options[:resend_on_redirect]
self.http_method = Net::HTTP::Get
end
else