From b8170fb7e2696e018c12cdd72c7148ec57a72db4 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Tue, 16 Apr 2013 01:52:59 +0900 Subject: [PATCH] Increase the chance of having a finalizer called. --- test/test_http_cookie_jar.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index 505a45e..8e5e252 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -807,8 +807,10 @@ module TestHTTPCookieJar db = jar.store.instance_variable_get(:@db) break } - GC.start - assert_send [db, :closed?] + at_exit { + GC.start + assert_send [db, :closed?] + } end def test_upgrade_mozillastore