From 1dc099228ee0f59c13385a3e7346a2cb37d85153 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 25 Oct 2013 19:54:39 +0000 Subject: tests: limit oobgc check to accepted sockets Otherwise these tests fail if we start using IO#autoclose=true on Ruby 1.9 (and also if we use IPv6 sockets for tests). --- t/oob_gc.ru | 3 +-- t/oob_gc_path.ru | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/t/oob_gc.ru b/t/oob_gc.ru index c6035b6..c253540 100644 --- a/t/oob_gc.ru +++ b/t/oob_gc.ru @@ -7,8 +7,7 @@ $gc_started = false # Mock GC.start def GC.start - ObjectSpace.each_object(BasicSocket) do |x| - next if Unicorn::HttpServer::LISTENERS.include?(x) + ObjectSpace.each_object(Kgio::Socket) do |x| x.closed? or abort "not closed #{x}" end $gc_started = true diff --git a/t/oob_gc_path.ru b/t/oob_gc_path.ru index e936a85..af8e3b9 100644 --- a/t/oob_gc_path.ru +++ b/t/oob_gc_path.ru @@ -7,8 +7,7 @@ $gc_started = false # Mock GC.start def GC.start - ObjectSpace.each_object(BasicSocket) do |x| - next if Unicorn::HttpServer::LISTENERS.include?(x) + ObjectSpace.each_object(Kgio::Socket) do |x| x.closed? or abort "not closed #{x}" end $gc_started = true -- cgit v1.2.3-24-ge0c7