aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/integration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/integration.rb')
-rw-r--r--actionpack/lib/action_controller/integration.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index 26b695570b..fda6b639d1 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -332,11 +332,13 @@ module ActionController
@cookies[name] = value
end
- @body = ""
if body.is_a?(String)
- @body << body
+ @body_parts = [body]
+ @body = body
else
- body.each { |part| @body << part }
+ @body_parts = []
+ body.each { |part| @body_parts << part.to_s }
+ @body = @body_parts.join
end
if @controller = ActionController::Base.last_instantiation
@@ -349,7 +351,7 @@ module ActionController
@response = Response.new
@response.status = status.to_s
@response.headers.replace(@headers)
- @response.body = @body
+ @response.body = @body_parts
end
# Decorate the response with the standard behavior of the