about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-12-28 07:08:00 +0000
committerEric Wong <e@80x24.org>2014-12-28 17:11:53 +0000
commit0427b31e1f5d676bc4f7a73f001b12335535d2db (patch)
tree3f372ff832967588b522278f315fc045bfa2678c
parent776d3e3d7ac19a50f7342fa48c0a5d5a7e224359 (diff)
downloadunicorn-0427b31e1f5d676bc4f7a73f001b12335535d2db.tar.gz
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.
-rw-r--r--lib/unicorn/tmpio.rb5
1 files changed, 0 insertions, 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