From 1c9e129fc46fb7abc496a8423bbd665ec991a655 Mon Sep 17 00:00:00 2001 From: Thomas Nys Date: Sat, 18 Apr 2015 13:41:48 +0200 Subject: [PATCH] Mitigates Style/AndOr --- lib/httparty/net_digest_auth.rb | 4 ++-- lib/httparty/request.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/httparty/net_digest_auth.rb b/lib/httparty/net_digest_auth.rb index 777733b..e97f818 100644 --- a/lib/httparty/net_digest_auth.rb +++ b/lib/httparty/net_digest_auth.rb @@ -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 diff --git a/lib/httparty/request.rb b/lib/httparty/request.rb index ad16764..b7ce090 100644 --- a/lib/httparty/request.rb +++ b/lib/httparty/request.rb @@ -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