From cb84e97d2fa5464dabddce035f62cd511bbdd3ca Mon Sep 17 00:00:00 2001 From: Dave Kimura Date: Sat, 2 Mar 2024 23:51:43 -0500 Subject: [PATCH] frozen on Ruby 3+ --- lib/clamby/command.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/clamby/command.rb b/lib/clamby/command.rb index 28a10cd..db27c46 100644 --- a/lib/clamby/command.rb +++ b/lib/clamby/command.rb @@ -30,7 +30,8 @@ def self.scan(path) # $CHILD_STATUS maybe nil if the execution itself (not the client process) # fails - case $CHILD_STATUS && $CHILD_STATUS.exitstatus + child_status = $CHILD_STATUS.dup # $CHILD_STATUS in Ruby 3.0+ is frozen + case child_status && child_status.exitstatus when 0 return false when nil, 2 @@ -38,7 +39,7 @@ def self.scan(path) if Clamby.config[:error_clamscan_client_error] && Clamby.config[:daemonize] raise Clamby::ClamscanClientError.new("Clamscan client error") end - + # returns true to maintain legacy behavior return true else