Project

General

Profile

Backport #3227 » tempfile-unlink-tcase.rb

Testcase derived by rack-1.1.0 - Flameeyes (Diego Elio Pettenò), 05/01/2010 04:59 AM

 
require 'tempfile'

tmp = Tempfile.new('RackRewindableInput')
tmp.chmod(0000)
tmp.set_encoding(Encoding::BINARY) if tmp.respond_to?(:set_encoding)
tmp.binmode

tmp.unlink
raise 'Unlink failed. IO closed.' if tmp.closed?
    (1-1/1)