Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initialize ivars, refactor recycle! to call initialize

  • Loading branch information...
commit 76d75f42409a5711a772d78f67cb635b9b1e933a 1 parent 82667c8
@tenderlove tenderlove authored
View
10 actionpack/lib/action_controller/test_case.rb
@@ -220,15 +220,7 @@ def default_env
class TestResponse < ActionDispatch::TestResponse
def recycle!
- @status = 200
- @header = {}
- @writer = lambda { |x| @body << x }
- @block = nil
- @length = 0
- @body = []
- @committed = false
- @charset = @content_type = nil
- @request = @template = nil
+ initialize
end
end
View
2  actionpack/lib/action_dispatch/http/response.rb
@@ -74,6 +74,8 @@ def initialize(status = 200, header = {}, body = [])
@blank = false
@cv = new_cond
@committed = false
+ @content_type = nil
+ @charset = nil
if content_type = self[CONTENT_TYPE]
type, charset = content_type.split(/;\s*charset=/)
Please sign in to comment.
Something went wrong with that request. Please try again.