diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 18:16:14 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 18:16:14 +0000 |
commit | 9258462e2a2dadaf82e3b657400eeb94c457700b (patch) | |
tree | bf6ea31efc95c2374eb6b99996c89559431ebbb5 /test/test_tempfile.rb | |
parent | aa89e910d03662498ec516d8b785ac393f59c885 (diff) |
merge revision(s) 57437:
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/branches/ruby_2_4@57878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r-- | test/test_tempfile.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index cd2828df37..2149aaf77c 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 |