test runner: avoid implicit conversion from nil to String

This commit is contained in:
Moritz Bunkus 2018-03-08 20:41:26 +01:00
parent dadd071f64
commit 4a92b442dd

View File

@ -76,7 +76,7 @@ class SimpleTest
end end
def clean_tmp def clean_tmp
File.unlink(@tmp) if File.exists?(@tmp) && (ENV["KEEP_TMPFILES"] != "1") File.unlink(@tmp) if @tmp && File.exists?(@tmp) && !ENV["KEEP_TMPFILES"].nil? && (ENV["KEEP_TMPFILES"] != "1")
@tmp = nil @tmp = nil
end end