From 8abf3483e840d0d1408dd362fd88804d2c55ecfd Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Tue, 16 Apr 2013 02:20:54 +0900 Subject: [PATCH] Travis-CI keeps reporting SEGV in ruby 1.9.3p327, so disuse at_exit. --- test/test_http_cookie_jar.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index 2b660c4..b7b6dcc 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -805,15 +805,15 @@ module TestHTTPCookieJar jar = HTTP::CookieJar.new(:store => :mozilla, :filename => ':memory:') add_and_delete(jar) db = jar.store.instance_variable_get(:@db) - break - } - at_exit { - GC.start - if db.closed? - puts "finalizer worked" - else - puts "finalizer did not work" + class << db + alias close_orig close + def close + STDERR.print "[finalizer is called]" + STDERR.flush + close_orig + end end + break } end