Skip to content

Commit 546dec9

Browse files
committed
Prefer frozen empty string.
1 parent 08051c3 commit 546dec9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/async/http/faraday/adapter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def with_timeout(task: Async::Task.current)
241241

242242
def encoded_body(response)
243243
body = response.read
244-
return +"" if body.nil?
244+
return "" if body.nil?
245245
content_type = response.headers["content-type"]
246246
return body unless content_type
247247
params = extract_type_parameters(content_type)

test/async/http/faraday/adapter.rb

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def get_response(url = bound_url, path = "/index", adapter_options: {})
103103

104104
it "properly handles no content responses" do
105105
expect(get_response.body).to be == ""
106-
expect(get_response.body).not.to be(:frozen?)
107106
end
108107
end
109108

0 commit comments

Comments
 (0)