aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_parser.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 13:33:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 13:33:06 +0000
commitc11f98eddc78938808ee5548e258b82beb533d93 (patch)
tree8e688506a9ef68511759a96e551c4233be996acb /test/rdoc/test_rdoc_parser.rb
parent164fb03302fb7b794dfcfe0efd8706230f034398 (diff)
downloadruby-c11f98eddc78938808ee5548e258b82beb533d93.tar.gz
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_parser.rb')
-rw-r--r--test/rdoc/test_rdoc_parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index cbc3dab9ea..e2494a1b06 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -96,7 +96,7 @@ class TestRDocParser < RDoc::TestCase
def test_class_for_forbidden
skip 'chmod not supported' if Gem.win_platform?
- Tempfile.open 'forbidden' do |io|
+ Tempfile.create 'forbidden' do |io|
begin
File.chmod 0000, io.path
forbidden = @store.add_file io.path