diff options
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_generator_json_index.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/rdoc/test_rdoc_generator_json_index.rb b/test/rdoc/test_rdoc_generator_json_index.rb index f25ee27d5e..06a5ddcd4a 100644 --- a/test/rdoc/test_rdoc_generator_json_index.rb +++ b/test/rdoc/test_rdoc_generator_json_index.rb @@ -148,8 +148,9 @@ class TestRDocGeneratorJsonIndex < RDoc::TestCase 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 = / |