From 3358447d32b70e96f6cd48f05967306eafbc00d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Sep 2015 05:33:15 +0000 Subject: t/close-has-env.ru: ensure close is idempotent 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. --- t/close-has-env.ru | 1 + 1 file changed, 1 insertion(+) diff --git a/t/close-has-env.ru b/t/close-has-env.ru index 471f605..3b6ec88 100644 --- a/t/close-has-env.ru +++ b/t/close-has-env.ru @@ -10,6 +10,7 @@ class ClosablePipe < ::IO end def close + return if closed? # idempotent for Ruby 2.3.0 compatibility super $stdout.syswrite "path_info=#{@env['PATH_INFO']}\n" end -- cgit v1.2.3-24-ge0c7