aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/xmlrpc/webrick_testing.rb9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e945553b9..9fd18059ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 13 09:56:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
+ catch IOError when server socket was closed.
+
Sun Feb 13 07:39:51 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_inject): typo fixed. a patch from Gaku Ueda in
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index 4c0cf89f1a..f112836a6a 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -18,8 +18,13 @@ module WEBrick_Testing
:StartCallback => proc { @__started = true }
}.update(config))
yield @__server
- @__server.start
- @__started = false
+ begin
+ @__server.start
+ rescue IOError => e
+ assert_match(/closed/, e.message)
+ ensure
+ @__started = false
+ end
}
Timeout.timeout(5) {