Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
04/01/08 06:11:40 (5 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: don't confuse with headers method call

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/integration.rb

    r8978 r9188  
    307307        # like cookies, status, headers, etc. 
    308308        def parse_result 
    309           headers, result_body = @result.split(/\r\n\r\n/, 2) 
     309          response_headers, result_body = @result.split(/\r\n\r\n/, 2) 
    310310 
    311311          @headers = Hash.new { |h,k| h[k] = [] } 
    312           headers.each_line do |line| 
     312          response_headers.to_s.each_line do |line| 
    313313            key, value = line.strip.split(/:\s*/, 2) 
    314314            @headers[key.downcase] << value 
     
    320320          end 
    321321 
    322           @status, @status_message = @headers["status"].first.split(/ /) 
     322          @status, @status_message = @headers["status"].first.to_s.split(/ /) 
    323323          @status = @status.to_i 
    324324        end