Skip to content

Commit

Permalink
Inline check for legacy ruby (since it's only one now anyway)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Dec 17, 2024
1 parent 700d08a commit 76f2b40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/datadog/profiling/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 76f2b40

Please sign in to comment.