From 86cba9111538844433db8edcedc721acf4c989f6 Mon Sep 17 00:00:00 2001 From: "Ahmed El.Hussaini" <328866+sandboxws@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:06:56 -0400 Subject: [PATCH] Fix rubocop error --- lib/ddtrace/contrib/active_record/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ddtrace/contrib/active_record/utils.rb b/lib/ddtrace/contrib/active_record/utils.rb index bb29b6e8f5..08424ae456 100644 --- a/lib/ddtrace/contrib/active_record/utils.rb +++ b/lib/ddtrace/contrib/active_record/utils.rb @@ -119,7 +119,7 @@ def self.db_config(connection_pool) end def self.extract_caller_path(callers) - caller_path = callers.reject { |c| c =~ %r{lib/ruby/gems} }[0...5] + caller_path = callers.reject { |c| c =~ c.include?('lib/ruby/gems') }[0...5] # Handle cases when the db query is triggered from inside of a Rubygem caller_path = callers[0...5] if caller_path.nil? caller_path.join(",\n")