From 76f2b402b4e37df7d1efc7d54d8a0d8acd06deb4 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Tue, 17 Dec 2024 12:16:59 +0000 Subject: [PATCH] Inline check for legacy ruby (since it's only one now anyway) --- lib/datadog/profiling/component.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/datadog/profiling/component.rb b/lib/datadog/profiling/component.rb index 9c84b57008c..e06eeb26251 100644 --- a/lib/datadog/profiling/component.rb +++ b/lib/datadog/profiling/component.rb @@ -246,7 +246,6 @@ def self.build_profiler_component(settings:, agent_settings:, optional_tracer:, private_class_method def self.no_signals_workaround_enabled?(settings, logger) # rubocop:disable Metrics/MethodLength setting_value = settings.profiling.advanced.no_signals_workaround_enabled - legacy_ruby_that_should_use_workaround = RUBY_VERSION.start_with?("2.5.") unless [true, false, :auto].include?(setting_value) logger.warn( @@ -284,7 +283,7 @@ def self.build_profiler_component(settings:, agent_settings:, optional_tracer:, # Setting is in auto mode. Let's probe to see if we should enable it: # We don't warn users in this situation because "upgrade your Ruby" is not a great warning - return true if legacy_ruby_that_should_use_workaround + return true if RUBY_VERSION.start_with?("2.5.") if Gem.loaded_specs["mysql2"] && incompatible_libmysqlclient_version?(settings, logger) logger.warn(