Skip to content

Commit ea40ec5

Browse files
committed
Make mutation stand out some more.
Felt that += overwriting the path variable was a little too hidden. Make the outcomes easier to spot with an if-else branch.
1 parent 7f0d415 commit ea40ec5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

actionpack/lib/action_dispatch/testing/integration.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,11 @@ def initialize(mime_name, param_encoder, response_parser, url_encoded_form = fal
423423
end
424424

425425
def append_format_to(path)
426-
path += @path_format unless @url_encoded_form
427-
path
426+
if @url_encoded_form
427+
path + @path_format
428+
else
429+
path
430+
end
428431
end
429432

430433
def content_type

0 commit comments

Comments
 (0)