From fbd98f93aefc722a3821401a07bbbef1ff15b89d Mon Sep 17 00:00:00 2001 From: Samuel Beaulieu Date: Fri, 9 Oct 2020 10:18:53 -0500 Subject: [PATCH] (maint) Fix bug with detecting ABS service Before this change the code would try to check if an object was ABS by using is_a? which is only for instances of a class. It also compared with ABS.class which returns the Class class. Now fixed by comparing the object to the static class --- lib/vmfloaty/service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmfloaty/service.rb b/lib/vmfloaty/service.rb index a0303c4..ee41648 100644 --- a/lib/vmfloaty/service.rb +++ b/lib/vmfloaty/service.rb @@ -139,7 +139,7 @@ class Service # some methods do not exist for ABS, and if possible should target the Pooler service def maybe_use_vmpooler - if @service_object.is_a?(ABS.class) + if @service_object == ABS # this is not an instance if !self.silent FloatyLogger.info "The service in use is ABS, but the requested method should run against vmpooler directly, using fallback_vmpooler config from ~/.vmfloaty.yml" self.silent = true