aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-04-01 06:11:40 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-04-01 06:11:40 +0000
commit09ca8a6701b023f5658cb5e8c0da9ffa5792e61d (patch)
tree700324ab6e14846566701600416196b420bd3bc9 /actionpack
parentb79f7d127aeaa4d563fbe3be5ae2db03d75354be (diff)
downloadrails-09ca8a6701b023f5658cb5e8c0da9ffa5792e61d.tar.gz
rails-09ca8a6701b023f5658cb5e8c0da9ffa5792e61d.tar.bz2
rails-09ca8a6701b023f5658cb5e8c0da9ffa5792e61d.zip
Ruby 1.9 compat: don't confuse with headers method call
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/integration.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index 6ccaa7eaa4..a4bbee9c54 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -306,10 +306,10 @@ module ActionController
# Parses the result of the response and extracts the various values,
# like cookies, status, headers, etc.
def parse_result
- headers, result_body = @result.split(/\r\n\r\n/, 2)
+ response_headers, result_body = @result.split(/\r\n\r\n/, 2)
@headers = Hash.new { |h,k| h[k] = [] }
- headers.each_line do |line|
+ response_headers.to_s.each_line do |line|
key, value = line.strip.split(/:\s*/, 2)
@headers[key.downcase] << value
end
@@ -319,7 +319,7 @@ module ActionController
@cookies[name] = value
end
- @status, @status_message = @headers["status"].first.split(/ /)
+ @status, @status_message = @headers["status"].first.to_s.split(/ /)
@status = @status.to_i
end