about summary refs log tree commit homepage
path: root/lib/rainbows/sendfile.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-19 10:09:50 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-19 17:04:18 -0700
commitc587c585e6d327c1646ce33fa10fbef6c27fc74c (patch)
tree41f410744078577326051a9b301ce91d29355de4 /lib/rainbows/sendfile.rb
parentfa70dc9090eab3b518d56daf3f968d07a4a05526 (diff)
downloadrainbows-c587c585e6d327c1646ce33fa10fbef6c27fc74c.tar.gz
IO#read always returns a binary string buffer if passed an
explicit length to read, and we always do that.  This is
a small garbage reduction.
Diffstat (limited to 'lib/rainbows/sendfile.rb')
-rw-r--r--lib/rainbows/sendfile.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/sendfile.rb b/lib/rainbows/sendfile.rb
index c2e63be..2804217 100644
--- a/lib/rainbows/sendfile.rb
+++ b/lib/rainbows/sendfile.rb
@@ -65,7 +65,7 @@ class Rainbows::Sendfile < Struct.new(:app)
     # fallback in case our +to_path+ doesn't get handled for whatever reason
     def each(&block)
       buf = ''
-      File.open(to_path, 'rb') do |fp|
+      File.open(to_path) do |fp|
         yield buf while fp.read(0x4000, buf)
       end
     end