remove nil test

This commit is contained in:
onyx-and-iris 2023-07-26 08:45:20 +01:00
parent 33bf0d9d5c
commit e7244957b1

View File

@ -61,13 +61,13 @@ module Voicemeeter
}
res = send(fn, *args)
if exp.nil?
unless ok.include?(res)
if exp
unless exp.call(res) || ok.include?(res)
logger.error "#{to_cname.call} returned #{res}"
raise Errors::VMCAPIError.new to_cname.call, res
end
else
unless exp.call(res) || ok.include?(res)
unless ok.include?(res)
logger.error "#{to_cname.call} returned #{res}"
raise Errors::VMCAPIError.new to_cname.call, res
end