mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-04 00:02:03 -04:00
Fix instances of frozen empty string literals (#1040)
This commit is contained in:
parent
b5bbf1f2d2
commit
e331955fd8
@ -59,7 +59,7 @@ module Faraday
|
||||
end
|
||||
|
||||
save_response(env, http_response.code.to_i,
|
||||
http_response.body || '', nil,
|
||||
http_response.body || +'', nil,
|
||||
http_response.message) do |response_headers|
|
||||
http_response.each_header do |key, value|
|
||||
response_headers[key] = value
|
||||
@ -101,7 +101,7 @@ module Faraday
|
||||
env[:request].on_data.call(chunk, size)
|
||||
end
|
||||
end
|
||||
env[:request].on_data.call('', 0) unless yielded
|
||||
env[:request].on_data.call(+'', 0) unless yielded
|
||||
# Net::HTTP returns something,
|
||||
# but it's not meaningful according to the docs.
|
||||
http_response.body = nil
|
||||
|
@ -132,7 +132,7 @@ module Faraday
|
||||
# Sets content length to zero and the body to the empty string.
|
||||
def clear_body
|
||||
request_headers[ContentLength] = '0'
|
||||
self.body = ''
|
||||
self.body = +''
|
||||
end
|
||||
|
||||
# @return [Boolean] true if the status isn't in the set of
|
||||
|
Loading…
x
Reference in New Issue
Block a user