From 67c7f9b71b05968a9061d9e0c25a37d076b63bcb Mon Sep 17 00:00:00 2001 From: mishina Date: Sat, 8 Jan 2022 23:50:04 +0900 Subject: [PATCH] Use Timeout.timeout instead of Object#timeout This change suppresses the following warning: ``` warning: Object#timeout is deprecated, use Timeout.timeout instead. ``` --- lib/god/system/slash_proc_poller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/god/system/slash_proc_poller.rb b/lib/god/system/slash_proc_poller.rb index 59693cf9..e5eaa901 100644 --- a/lib/god/system/slash_proc_poller.rb +++ b/lib/god/system/slash_proc_poller.rb @@ -61,7 +61,7 @@ def percent_cpu # read from them. Try to use this sparingly as it is expensive. def self.readable?(path) begin - timeout(1) { File.read(path) } + Timeout.timeout(1) { File.read(path) } rescue Timeout::Error false end