Skip to content

Commit 4e784a2

Browse files
author
Stan Cheng
committed
Fix timeout exception caused by Ruby version > 3.0.2; mojombo#262
1 parent 92c06aa commit 4e784a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/god/system/slash_proc_poller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def percent_cpu
6161
# read from them. Try to use this sparingly as it is expensive.
6262
def self.readable?(path)
6363
begin
64-
timeout(1) { File.read(path) }
64+
Timeout.timeout(1) { File.read(path) }
6565
rescue Timeout::Error
6666
false
6767
end

0 commit comments

Comments
 (0)