From e15b3c83b880aa2c2f07378095d1eba0214ca468 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sat, 28 May 2011 17:17:36 +0000 Subject: [PATCH] * test/net/http/utils.rb (TestNetHTTPUtils#teardown): add nil check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ test/net/http/utils.rb | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index da21d87b23..c2b5e87c7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 29 02:16:53 2011 KOSAKI Motohiro + + * test/net/http/utils.rb (TestNetHTTPUtils#teardown): add nil check. + Sun May 29 00:22:40 2011 KOSAKI Motohiro * process.c (before_exec, after_exec): change from macro to function. diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index 32cea2a78c..227c39fc9b 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -31,9 +31,11 @@ module TestNetHTTPUtils end def teardown - @server.shutdown - until @server.status == :Stop - sleep 0.1 + if @server + @server.shutdown + until @server.status == :Stop + sleep 0.1 + end end # resume global state Net::HTTP.version_1_2