mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
add perenthesis in call()
This commit is contained in:
parent
3e6fe5c443
commit
ea57227b46
@ -55,11 +55,11 @@ module Voicemeeter
|
||||
def call(fn, *args, ok: [0], exp: nil)
|
||||
res = send(fn, *args)
|
||||
if exp.nil?
|
||||
unless ok.include? res
|
||||
unless ok.include?(res)
|
||||
raise Errors::VMCAPIError.new("#{fn} returned #{res}")
|
||||
end
|
||||
else
|
||||
unless exp.call(res)
|
||||
unless exp.call(res) && ok.include?(res)
|
||||
raise Errors::VMCAPIError.new("#{fn} returned #{res}")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user