tmpio: workaround File#path being tainted on unlink
commit024f7a8c8c780b6eae4f952dd6ef86dca8036cb6
authorTerry Scheingeld <tscheingeld32@gmail.com>
Wed, 11 Dec 2019 16:24:59 +0000 (11 11:24 -0500)
committerEric Wong <e@80x24.org>
Wed, 11 Dec 2019 22:54:59 +0000 (11 22:54 +0000)
tree8c1b54ba331d68eaeb75d9dadd48af3db8a6b43e
parent08ba2e67d356c46ace310ce9a483511e68e9d6d6
tmpio: workaround File#path being tainted on unlink

Ruby mistakenly taints the file path, causing File.unlink
to fail: https://bugs.ruby-lang.org/issues/14485

Workaround the Ruby bug by keeping the path as a local
variable and passing that to File.unlink, instead of the
return value of File#path.

Link: https://bogomips.org/unicorn-public/CABg1sXrvGv9G6CDQxePDUqTe6N-5UpLXm7eG3YQO=dda-Cgg7A@mail.gmail.com/
lib/unicorn/tmpio.rb