Skip to content

Commit

Permalink
Explicitly pass reason_phrase to save_response in test adapter. (#…
Browse files Browse the repository at this point in the history
…1445)

Fixes #1444
  • Loading branch information
iMacTia authored Aug 11, 2022
1 parent 43d6797 commit 89b1fe3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/faraday/adapter/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ def call(env)
else
stub.block.call(env, meta)
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)
end
Expand Down

0 comments on commit 89b1fe3

Please sign in to comment.