diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-19 10:09:50 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-19 17:04:18 -0700 |
commit | c587c585e6d327c1646ce33fa10fbef6c27fc74c (patch) | |
tree | 41f410744078577326051a9b301ce91d29355de4 /lib/rainbows/response/body.rb | |
parent | fa70dc9090eab3b518d56daf3f968d07a4a05526 (diff) | |
download | rainbows-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/response/body.rb')
-rw-r--r-- | lib/rainbows/response/body.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/response/body.rb b/lib/rainbows/response/body.rb index e399df7..0a2bb5d 100644 --- a/lib/rainbows/response/body.rb +++ b/lib/rainbows/response/body.rb @@ -41,7 +41,7 @@ module Rainbows::Response::Body # :nodoc: # try to take advantage of Rainbows::DevFdResponse, calling File.open # is a last resort path = body.to_path - path =~ %r{\A/dev/fd/(\d+)\z} ? IO.new($1.to_i) : File.open(path, 'rb') + path =~ %r{\A/dev/fd/(\d+)\z} ? IO.new($1.to_i) : File.open(path) end end |