diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-26 13:33:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-26 13:33:06 +0000 |
commit | c11f98eddc78938808ee5548e258b82beb533d93 (patch) | |
tree | 8e688506a9ef68511759a96e551c4233be996acb /test/rdoc/test_rdoc_rdoc.rb | |
parent | 164fb03302fb7b794dfcfe0efd8706230f034398 (diff) |
test/rdoc: avoid tempfile leaks
* test/rdoc/test_rdoc_parser.rb (test_class_for_forbidden): avoid
tempfile leaks by using `Tempfile.create` instead of
`Tempfile.open`.
* test/rdoc/test_rdoc_rd_block_parser.rb (test_parse_include_subtree):
ditto.
* test/rdoc/test_rdoc_rdoc.rb (test_parse_file_encoding): ditto.
* test/rdoc/test_rdoc_rdoc.rb (test_parse_file_forbidden): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_rdoc.rb')
-rw-r--r-- | test/rdoc/test_rdoc_rdoc.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb index b36e47398b..8b349a4389 100644 --- a/test/rdoc/test_rdoc_rdoc.rb +++ b/test/rdoc/test_rdoc_rdoc.rb @@ -252,7 +252,7 @@ class TestRDocRDoc < RDoc::TestCase @rdoc.options.encoding = Encoding::ISO_8859_1 @rdoc.store = RDoc::Store.new - Tempfile.open 'test.txt' do |io| + Tempfile.create 'test.txt' do |io| io.write 'hi' io.rewind @@ -267,7 +267,7 @@ class TestRDocRDoc < RDoc::TestCase @rdoc.store = RDoc::Store.new - Tempfile.open 'test.txt' do |io| + Tempfile.create 'test.txt' do |io| io.write 'hi' io.rewind @@ -382,7 +382,7 @@ class TestRDocRDoc < RDoc::TestCase end def test_setup_output_dir_exists_file - Tempfile.open 'test_rdoc_rdoc' do |tempfile| + Tempfile.create 'test_rdoc_rdoc' do |tempfile| path = tempfile.path e = assert_raises RDoc::Error do |