summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_parser.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-08-29 12:17:07 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-08-29 12:23:23 +0200
commite8c3872555fc85640505974e6b1c39d315572689 (patch)
treed3efaa93985db2932c57d15729d18e3c0e1ca2d6 /test/rdoc/test_rdoc_parser.rb
parentff323b2a5c56cdec93900af4d67f3811f946d9b8 (diff)
Simplify Tempfile.open calls with a block as they now unlink the file automatically
Diffstat (limited to 'test/rdoc/test_rdoc_parser.rb')
-rw-r--r--test/rdoc/test_rdoc_parser.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index 7cc3c2d926..cd43aca121 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -106,7 +106,7 @@ class TestRDocParser < RDoc::TestCase
def test_class_for_forbidden
omit 'chmod not supported' if Gem.win_platform?
- tf = Tempfile.open 'forbidden' do |io|
+ Tempfile.open 'forbidden' do |io|
begin
File.chmod 0000, io.path
forbidden = @store.add_file io.path
@@ -117,9 +117,7 @@ class TestRDocParser < RDoc::TestCase
ensure
File.chmod 0400, io.path
end
- io
end
- tf.close!
end
def test_class_for_modeline