diff options
author | Eric Wong <e@80x24.org> | 2022-01-23 21:28:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-01-23 21:29:22 +0000 |
commit | 27a288ff1033ae446e1d58d7c510bf9d1cf00961 (patch) | |
tree | c2382eab2223755096ab06e472a2ce73b16d10b8 /bin | |
parent | f9d9927e55d8c1132073af4f8b5dbbf3e04ea87d (diff) | |
download | dtas-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-x | bin/dtas-readahead | 2 |
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) |