From 42baa543fc78badf1828940f49e85da202f38ffc Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 31 Aug 2023 22:54:08 +0100 Subject: [PATCH] switch send for public_send --- lib/voicemeeter/base.rb | 4 ++-- lib/voicemeeter/iremote.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/voicemeeter/base.rb b/lib/voicemeeter/base.rb index f30fd81..96043bb 100644 --- a/lib/voicemeeter/base.rb +++ b/lib/voicemeeter/base.rb @@ -207,9 +207,9 @@ module Voicemeeter data.each do |key, hash| case key.to_s.split("-") in [/strip|bus|button/ => kls, /^[0-9]+$/ => index] - target = send(kls) + target = public_send(kls) in ["vban", /in|instream|out|oustream/ => dir, /^[0-9]+$/ => index] - target = vban.send("#{dir.chomp("stream")}stream") + target = vban.public_send("#{dir.chomp("stream")}stream") else raise KeyError, "invalid config key '#{key}'" end diff --git a/lib/voicemeeter/iremote.rb b/lib/voicemeeter/iremote.rb index 4376fa9..556f55c 100644 --- a/lib/voicemeeter/iremote.rb +++ b/lib/voicemeeter/iremote.rb @@ -37,12 +37,12 @@ module Voicemeeter def apply(params) params.each do |key, val| if val.is_a? Hash - target = send(key) + target = pulic_send(key) target.apply(val) elsif key == :mode - mode.send("#{val}=", true) + mode.pulic_send("#{val}=", true) else - send("#{key}=", val) + pulic_send("#{key}=", val) end end end