about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-16 03:14:12 +0000
committerEric Wong <e@80x24.org>2017-03-18 01:28:47 +0000
commit040f0d3bfbb71289cdc91c63dd097fc3d832e80f (patch)
tree952c6547142df4915a2aa781597a85b6ecd866b5
parent160ebb01ff5ac17d7ad78b8005e922cacadc56e4 (diff)
File#size is available in modern Rubies so the extra syscall
is avoided.
-rw-r--r--lib/raindrops/aggregate/pmq.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/raindrops/aggregate/pmq.rb b/lib/raindrops/aggregate/pmq.rb
index 5a6a1f6..98d4169 100644
--- a/lib/raindrops/aggregate/pmq.rb
+++ b/lib/raindrops/aggregate/pmq.rb
@@ -153,7 +153,7 @@ class Raindrops::Aggregate::PMQ
       Marshal.load(synchronize(@rd, RDLOCK) do |rd|
         dst = StringIO.new
         dst.binmode
-        IO.copy_stream(rd, dst, rd.stat.size, 0)
+        IO.copy_stream(rd, dst, rd.size, 0)
         dst.string
       end)
     end