Switch to Object.const_get

As we get error with Kernel.const_get(..., false)

```
 uninitialized constant Kernel::Gitlab
```

Kernel is included into Object. I guess top level constants are loaded
into Object and not the Kernel module.
This commit is contained in:
Thong Kuah 2019-04-05 10:25:01 +13:00
parent 480d57d2f7
commit 85c94725e5
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ module PrometheusAdapter
def calculate_reactive_cache(query_class_name, *args)
return unless prometheus_client
data = Kernel.const_get(query_class_name, false).new(prometheus_client_wrapper).query(*args)
data = Object.const_get(query_class_name, false).new(prometheus_client_wrapper).query(*args)
{
success: true,
data: data,