From 2ad20073074f39f3ee2904a45da310ce4041aa22 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 29 May 2014 10:44:59 +0000 Subject: * lib/csv.rb (CSV.open): Close the opened file when an exception occur. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/csv/test_features.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/csv/test_features.rb b/test/csv/test_features.rb index e9700c4ef4..e31465710b 100755 --- a/test/csv/test_features.rb +++ b/test/csv/test_features.rb @@ -218,6 +218,8 @@ class TestCSV::Features < TestCSV ) end assert_equal("\r\n", zipped.row_sep) + ensure + zipped.close end if defined?(Zlib::GzipReader) def test_gzip_writer_bug_fix -- cgit v1.2.3