about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-01-23 21:28:47 +0000
committerEric Wong <e@80x24.org>2022-01-23 21:29:22 +0000
commit27a288ff1033ae446e1d58d7c510bf9d1cf00961 (patch)
treec2382eab2223755096ab06e472a2ce73b16d10b8 /bin
parentf9d9927e55d8c1132073af4f8b5dbbf3e04ea87d (diff)
downloaddtas-27a288ff1033ae446e1d58d7c510bf9d1cf00961.tar.gz
IO#close is idempotent since Ruby 2.3, so reduce our instruction
footprint to save some memory.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dtas-readahead2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/dtas-readahead b/bin/dtas-readahead
index 75bfbe8..6da5f88 100755
--- a/bin/dtas-readahead
+++ b/bin/dtas-readahead
@@ -205,7 +205,7 @@ begin
     timeout = 0 if timeout < 0
   else
     work.each_value(&:close).clear
-    fp.close if fp && !fp.closed?
+    fp.close if fp
     fp = timeout = nil
   end
   r = w.to_io.wait_readable(timeout)