HomePhorge

(#14283) Call Tempfile#close and #unlink separately
1d800077c78aUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#14283) Call Tempfile#close and #unlink separately

Previously, we were calling Tempfile#close! which under ruby 1.8.7
will call the finalizer's cleanup routine directly. That may raise an
exception, e.g. Errno::EACCES, if the process is unable to unlink the
file, i.e. Windows. In ruby 1.9, the Tempfile#close! method was
changed to provide the same semantics as #close followed by #unlink.
Rather than monkey patch Tempfile, we simply call close followed by
unlink explicitly.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU7a7236157e4e: (#14283) Raise an error when crontab returns non-zero on AIX
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU1d800077c78a: (#14283) Call Tempfile#close and #unlink separately (authored by Josh Cooper <josh@puppetlabs.com>).Aug 14 2012, 7:08 AM