diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-04-06 20:53:48 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-04-06 20:53:48 -0300 |
commit | 29592a7f09dda2e7e1e0a915d9230fe6a9b5c0af (patch) | |
tree | 516163f34a39fcad4a82c38e4cc6ada2f41fdbe5 /actionpack/lib/action_dispatch/middleware/cookies.rb | |
parent | 0ca69ca65f83b4bb34f81f077c1c38c66ad868b9 (diff) | |
download | rails-29592a7f09dda2e7e1e0a915d9230fe6a9b5c0af.tar.gz rails-29592a7f09dda2e7e1e0a915d9230fe6a9b5c0af.tar.bz2 rails-29592a7f09dda2e7e1e0a915d9230fe6a9b5c0af.zip |
Use freeze instead of close!
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/cookies.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 24ebb8fed7..3ed5f1055f 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -115,13 +115,10 @@ module ActionDispatch @delete_cookies = {} @host = host @secure = secure - @closed = false @cookies = {} end - attr_reader :closed - alias :closed? :closed - def close!; @closed = true end + alias :closed? :frozen? # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists. def [](name) @@ -330,7 +327,7 @@ module ActionDispatch [status, headers, body] ensure cookie_jar = ActionDispatch::Request.new(env).cookie_jar unless cookie_jar - cookie_jar.close! + cookie_jar.freeze end end end |