From d6c0375e3de0dcc58d0cf6a86d50aceda0bfd6ad Mon Sep 17 00:00:00 2001 From: Pierre Schambacher Date: Wed, 28 Feb 2018 10:25:14 -0800 Subject: [PATCH] Guard the rails core extensions against null Redis registry (#357) * Guard the rails core extensions against null Redis registry --- lib/ddtrace/contrib/rails/core_extensions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ddtrace/contrib/rails/core_extensions.rb b/lib/ddtrace/contrib/rails/core_extensions.rb index 3c337a2dba..cd4839c018 100644 --- a/lib/ddtrace/contrib/rails/core_extensions.rb +++ b/lib/ddtrace/contrib/rails/core_extensions.rb @@ -336,7 +336,8 @@ def delete(*args, &block) end def self.reload_cache_store - return unless Datadog.registry[:redis].patched? + redis = Datadog.registry[:redis] + return unless redis && redis.patched? return unless defined?(::ActiveSupport::Cache::RedisStore) && defined?(::Rails.cache) &&