From 0427b31e1f5d676bc4f7a73f001b12335535d2db Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 28 Dec 2014 07:08:00 +0000 Subject: tmpio: 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. --- lib/unicorn/tmpio.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/unicorn/tmpio.rb b/lib/unicorn/tmpio.rb index 2da05a2..c97979a 100644 --- a/lib/unicorn/tmpio.rb +++ b/lib/unicorn/tmpio.rb @@ -21,9 +21,4 @@ class Unicorn::TmpIO < File fp.sync = true fp end - - # for easier env["rack.input"] compatibility with Rack <= 1.1 - def size - stat.size - end unless File.method_defined?(:size) end -- cgit v1.2.3-24-ge0c7