提交 a7c5d40d 编写于 作者: A Aaron Patterson

Merge branch 'master' of github.com:rails/rails

* 'master' of github.com:rails/rails:
  Cache flash now
  Revert "Use freeze instead of close!"
  Revert "Eagerly load Signed and Permanent cookies"
  cookies here
  Eagerly load Signed and Permanent cookies
  Use freeze instead of close!
......@@ -149,7 +149,7 @@ def replace(h) #:nodoc:
#
# Entries set via <tt>now</tt> are accessed the same way as standard entries: <tt>flash['my-key']</tt>.
def now
FlashNow.new(self)
@now ||= FlashNow.new(self)
end
# Keeps either the entire current flash or a specific flash entry available for the next action:
......
......@@ -521,7 +521,7 @@ def test_setting_cookies_raises_after_stream_back_to_client
end
end
def test_setting_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
def test_setting_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {
......@@ -540,7 +540,7 @@ def test_setting_permanent_cookies_raises_after_stream_back_to_client
end
end
def test_setting_permanent_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
def test_setting_permanent_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {
......@@ -559,7 +559,7 @@ def test_setting_signed_cookies_raises_after_stream_back_to_client
end
end
def test_setting_signed_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
def test_setting_signed_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册