diff options
Diffstat (limited to 'actionpack/test/controller/session/cookie_store_test.rb')
-rwxr-xr-x | actionpack/test/controller/session/cookie_store_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb index 28efcb8a50..0084f35dea 100755 --- a/actionpack/test/controller/session/cookie_store_test.rb +++ b/actionpack/test/controller/session/cookie_store_test.rb @@ -199,10 +199,9 @@ class CookieStoreTest < Test::Unit::TestCase ENV['HTTP_HOST'] = 'example.com' ENV['QUERY_STRING'] = '' - $stdin, old_stdin = StringIO.new(''), $stdin - yield CGI.new - ensure - $stdin = old_stdin + cgi = CGI.new('query', StringIO.new('')) + yield cgi if block_given? + cgi end end |