summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/rdoc/test_rdoc_parser.rb2
-rw-r--r--test/rdoc/test_rdoc_rd_block_parser.rb2
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb6
3 files changed, 5 insertions, 5 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
diff --git a/test/rdoc/test_rdoc_rd_block_parser.rb b/test/rdoc/test_rdoc_rd_block_parser.rb
index 7aa44925e8..5158f46b26 100644
--- a/test/rdoc/test_rdoc_rd_block_parser.rb
+++ b/test/rdoc/test_rdoc_rd_block_parser.rb
@@ -153,7 +153,7 @@ class TestRDocRdBlockParser < RDoc::TestCase
blank_line,
blank_line)
- Tempfile.open %w[parse_include .rd] do |io|
+ Tempfile.create %w[parse_include .rd] do |io|
io.puts "=begin\ninclude ((*worked*))\n=end"
io.flush
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