mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Use short syntax for 'File.open' block
This commit is contained in:
parent
6f4665588f
commit
519c227c4f
1 changed files with 1 additions and 2 deletions
|
@ -175,8 +175,7 @@ module Kemal
|
|||
|
||||
if @cached_files.sum(&.[1][:data].bytesize) + (size = File.size(file_path)) < CACHE_LIMIT
|
||||
data = Bytes.new(size)
|
||||
|
||||
File.open(file_path) { |f| f.read(data) }
|
||||
File.open(file_path, &.read(data))
|
||||
|
||||
filestat = File.info(file_path)
|
||||
|
||||
|
|
Loading…
Reference in a new issue