Explicitly pass reason_phrase to save_response in test adapter. (#1445)

Fixes #1444
This commit is contained in:
Matt 2022-08-11 13:48:13 +01:00 committed by GitHub
parent 43d6797770
commit 89b1fe3da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,7 +283,11 @@ module Faraday
else else
stub.block.call(env, meta) stub.block.call(env, meta)
end end
save_response(env, status, body, headers)
# We need to explicitly pass `reason_phrase = nil` here to avoid keyword args conflicts.
# See https://github.com/lostisland/faraday/issues/1444
# TODO: remove `nil` explicit reason_phrase once Ruby 3.0 becomes minimum req. version
save_response(env, status, body, headers, nil)
@app.call(env) @app.call(env)
end end