aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-27 05:01:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-27 05:01:18 +0000
commit9235aa5d78bdb9a77584dabe94ba738692f7172a (patch)
treeacf57cfc4bcebf04751a99f8035f0a6b14e20691 /test/test_tempfile.rb
parentad316bed3a07e5ab337752ee23d9a7769e950497 (diff)
downloadruby-9235aa5d78bdb9a77584dabe94ba738692f7172a.tar.gz
leakchecker.rb: get rid of uninitialized Tempfile
* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of errors on uninitialized Tempfile, which can be left when Dir.tmpdir failed or by Tempfile.allocate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 361613173f..7f7f75c7db 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -20,6 +20,10 @@ class TestTempfile < Test::Unit::TestCase
end
end
+ def test_leackchecker
+ assert_instance_of(Tempfile, Tempfile.allocate)
+ end
+
def test_basic
t = tempfile("foo")
path = t.path