diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-12 19:45:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-12 19:45:16 -0800 |
commit | 810837dda890a5bc5d0b4d65b973ca0ccc9465bd (patch) | |
tree | a540e2b9ac0bd28bec68e5c0c2d3207e818a5a9d /actionpack/lib/action_dispatch/http/response.rb | |
parent | 3d4f913f77f447e2a09415355249116d5e9d07d1 (diff) | |
download | rails-810837dda890a5bc5d0b4d65b973ca0ccc9465bd.tar.gz rails-810837dda890a5bc5d0b4d65b973ca0ccc9465bd.tar.bz2 rails-810837dda890a5bc5d0b4d65b973ca0ccc9465bd.zip |
use Array#join so that file encoding doesn't impact returned string.
Fixes #3957
Diffstat (limited to 'actionpack/lib/action_dispatch/http/response.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index fc840668d5..5797c63924 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -111,9 +111,9 @@ module ActionDispatch # :nodoc: end def body - str = '' - each { |part| str << part.to_s } - str + strings = [] + each { |part| strings << part.to_s } + strings.join end EMPTY = " " |