diff options
author | Eric Wong <e@80x24.org> | 2015-01-23 02:17:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-23 02:17:20 +0000 |
commit | 1faf2322b0776f7e51d4aa1f776ee4a0d268bff1 (patch) | |
tree | 73564d8d8615878e7199a0be828e52cdd0036636 /lib | |
parent | 004078c979dfb6323f20659ddeb9e329c523b071 (diff) | |
download | yahns-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.rb | 2 |
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 |