mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-24 19:00:49 +00:00
remove nil test
This commit is contained in:
parent
33bf0d9d5c
commit
e7244957b1
@ -61,13 +61,13 @@ module Voicemeeter
|
|||||||
}
|
}
|
||||||
|
|
||||||
res = send(fn, *args)
|
res = send(fn, *args)
|
||||||
if exp.nil?
|
if exp
|
||||||
unless ok.include?(res)
|
unless exp.call(res) || ok.include?(res)
|
||||||
logger.error "#{to_cname.call} returned #{res}"
|
logger.error "#{to_cname.call} returned #{res}"
|
||||||
raise Errors::VMCAPIError.new to_cname.call, res
|
raise Errors::VMCAPIError.new to_cname.call, res
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
unless exp.call(res) || ok.include?(res)
|
unless ok.include?(res)
|
||||||
logger.error "#{to_cname.call} returned #{res}"
|
logger.error "#{to_cname.call} returned #{res}"
|
||||||
raise Errors::VMCAPIError.new to_cname.call, res
|
raise Errors::VMCAPIError.new to_cname.call, res
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user