summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_parser.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-08-29 12:49:20 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-08-29 12:49:20 +0200
commitd7492a0be885ea9f2b9f71e3e95582f9a859c439 (patch)
tree01e47d0e0a0dcb3a2e23900bcb14bc754e102f23 /test/rdoc/test_rdoc_parser.rb
parent3beecafc2cae86290a191c1e841be13f5b08795d (diff)
Revert changes to rdoc & rubygems regarding Tempfile.open(&block)
* They likely want to support older Ruby/tempfile versions * Reverts part of e8c3872555fc85640505974e6b1c39d315572689
Diffstat (limited to 'test/rdoc/test_rdoc_parser.rb')
-rw-r--r--test/rdoc/test_rdoc_parser.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index cd43aca121..7cc3c2d926 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?
- Tempfile.open 'forbidden' do |io|
+ tf = Tempfile.open 'forbidden' do |io|
begin
File.chmod 0000, io.path
forbidden = @store.add_file io.path
@@ -117,7 +117,9 @@ class TestRDocParser < RDoc::TestCase
ensure
File.chmod 0400, io.path
end
+ io
end
+ tf.close!
end
def test_class_for_modeline