about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-01-23 02:17:20 +0000
committerEric Wong <e@80x24.org>2015-01-23 02:17:20 +0000
commit1faf2322b0776f7e51d4aa1f776ee4a0d268bff1 (patch)
tree73564d8d8615878e7199a0be828e52cdd0036636 /lib
parent004078c979dfb6323f20659ddeb9e329c523b071 (diff)
downloadyahns-1faf2322b0776f7e51d4aa1f776ee4a0d268bff1.tar.gz
Since we only support 1.9.3+, io.stat.size may be simplified
to io.size to reduce allocations of File::Stat objects.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/stream_file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/stream_file.rb b/lib/yahns/stream_file.rb
index bcca0d6..793f0de 100644
--- a/lib/yahns/stream_file.rb
+++ b/lib/yahns/stream_file.rb
@@ -31,7 +31,7 @@ class Yahns::StreamFile # :nodoc:
       end
     end
     @sf_offset = offset
-    @sf_count = count || @tmpio.stat.size
+    @sf_count = count || @tmpio.size
     @wbuf_persist = persist # whether or not we keep the connection alive
     @body = body
   end