summary refs log tree commit homepage
path: root/t
diff options
authorEric Wong <>2015-09-14 05:33:15 +0000
committerEric Wong <>2015-09-14 05:34:17 +0000
commit3358447d32b70e96f6cd48f05967306eafbc00d0 (patch)
tree1506e4cb0b7af5427c1452b7538122c8903495a3 /t
parent25904f92de4c456d99fe4210430d58296f84a0af (diff)
Ruby 2.3.0 will have idempotent IO#close, so closing an IO
twice will be idempotent and not raise an IOError exception.
Ensure we do not rely on the IOError exception to catch
our own errors.
Diffstat (limited to 't')
1 files changed, 1 insertions, 0 deletions
diff --git a/t/ b/t/
index 471f605..3b6ec88 100644
--- a/t/
+++ b/t/
@@ -10,6 +10,7 @@ class ClosablePipe < ::IO
   def close
+    return if closed? # idempotent for Ruby 2.3.0 compatibility
     $stdout.syswrite "path_info=#{@env['PATH_INFO']}\n"