mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_rdoc_generator_json_index.rb: leaked fd
* test/rdoc/test_rdoc_generator_json_index.rb (test_generate_gzipped): fix leaked file descriptor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57267e07c6
commit
007c4dbe84
1 changed files with 3 additions and 2 deletions
|
@ -148,8 +148,9 @@ class TestRDocGeneratorJsonIndex < RDoc::TestCase
|
||||||
assert_file 'js/search_index.js'
|
assert_file 'js/search_index.js'
|
||||||
assert_file 'js/search_index.js.gz'
|
assert_file 'js/search_index.js.gz'
|
||||||
|
|
||||||
gzip = File.open 'js/search_index.js.gz'
|
json = File.open('js/search_index.js.gz') {|gzip|
|
||||||
json = Zlib::GzipReader.new(gzip).read
|
Zlib::GzipReader.new(gzip).read
|
||||||
|
}
|
||||||
|
|
||||||
json =~ /\Avar search_data = /
|
json =~ /\Avar search_data = /
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue