ruby-changes:36898
From: nobu <ko1@a...>
Date: Thu, 25 Dec 2014 08:12:06 +0900 (JST)
Subject: [ruby-changes:36898] nobu:r48979 (trunk): test_rdoc_generator_json_index.rb: leaked fd
nobu 2014-12-25 08:11:44 +0900 (Thu, 25 Dec 2014) New Revision: 48979 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48979 Log: test_rdoc_generator_json_index.rb: leaked fd * test/rdoc/test_rdoc_generator_json_index.rb (test_generate_gzipped): fix leaked file descriptor. Modified files: trunk/test/rdoc/test_rdoc_generator_json_index.rb Index: test/rdoc/test_rdoc_generator_json_index.rb =================================================================== --- test/rdoc/test_rdoc_generator_json_index.rb (revision 48978) +++ test/rdoc/test_rdoc_generator_json_index.rb (revision 48979) @@ -148,8 +148,9 @@ class TestRDocGeneratorJsonIndex < RDoc: https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_generator_json_index.rb#L148 assert_file 'js/search_index.js' assert_file 'js/search_index.js.gz' - gzip = File.open 'js/search_index.js.gz' - json = Zlib::GzipReader.new(gzip).read + json = File.open('js/search_index.js.gz') {|gzip| + Zlib::GzipReader.new(gzip).read + } json =~ /\Avar search_data = / -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/