Skip to content

Commit

Permalink
Fix Style/ZeroLengthPredicate
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle committed Jan 12, 2023
1 parent 85577e2 commit a384efb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/faraday/adapter/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def headers_match?(request_headers)
end

def body_match?(request_body)
return true if body.to_s.size.zero?
return true if body.to_s.empty?

case body
when Proc
Expand Down
2 changes: 1 addition & 1 deletion lib/faraday/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def #{method}(url = nil, params = nil, headers = nil)
# @yield [Faraday::Request] for further request customizations
# @return [Faraday::Response]
def options(*args)
return @options if args.size.zero?
return @options if args.empty?

url, params, headers = *args
run_request(:options, url, nil, headers) do |request|
Expand Down

0 comments on commit a384efb

Please sign in to comment.