diff options
author | Benoit Daloze <[email protected]> | 2020-08-29 12:17:07 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-08-29 12:23:23 +0200 |
commit | e8c3872555fc85640505974e6b1c39d315572689 (patch) | |
tree | d3efaa93985db2932c57d15729d18e3c0e1ca2d6 /test/rdoc/test_rdoc_parser.rb | |
parent | ff323b2a5c56cdec93900af4d67f3811f946d9b8 (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.rb | 4 |
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 |