about summary refs log tree commit homepage
path: root/lib/unicorn/tmpio.rb
DateCommit message (Collapse)
2015-04-24tee_input: support for Rack::TempfileReaper middleware
Rack::TempfileReaper was added in rack 1.6 to cleanup temporary files. Make Unicorn::TmpIO ducktype-compatible so Rack::TempfileReaper may be used to free up space used by temporary buffer files. Ref: <CY1PR0301MB078011EB5A22B733EB222A45A4EE0@CY1PR0301MB0780.namprd03.prod.outlook.com> Reported-by: Mike Mulvaney <MMulvaney@bna.com>
2014-12-28tmpio: drop the "size" method
It is redundant given the existence of File#size in Ruby 1.9+ This saves 1440 bytes of bytecode on x86-64 under 2.2.0, and at least another 120 bytes for the method entry, hash table entry, and method definition overhead.
2011-03-27tmpio: do not redefine size method under 1.9.2+
File#size is available in 1.9.2
2010-10-05tmpio: use super instead of an explicit method
This is for compatibility with Ruby implementations such as Rubinius that use "IO.new" internally inside "IO.open"
2010-10-05Unicorn::Util.tmpio => Unicorn::TmpIO.new
This is slightly shorter and hopefully easier to find.