Skip to content

Commit

Permalink
Add comments to make Rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Jun 14, 2024
1 parent 577fdb0 commit 43a3e5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/profiling/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def self.build_profiler_component(settings:, agent_settings:, optional_tracer:)
private_class_method def self.dir_interruption_workaround_enabled?(settings, no_signals_workaround_enabled)
return false if no_signals_workaround_enabled

# Note: In the future this method will evolve to check for Ruby versions affected and not apply the workaround
# NOTE: In the future this method will evolve to check for Ruby versions affected and not apply the workaround
# when it's not needed but currently all known Ruby versions are affected.

settings.profiling.advanced.dir_interruption_workaround_enabled
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog/profiling/ext/dir_monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def self.apply!
end
end

# Monkey patches for Dir.singleton_class. See DirMonkeyPatches above for more details.
module DirClassMonkeyPatches
def [](*args, &block)
Datadog::Profiling::Collectors::CpuAndWallTimeWorker._native_hold_interruptions
Expand Down Expand Up @@ -142,6 +143,7 @@ def home(*args, &block)
ruby2_keywords :home if respond_to?(:ruby2_keywords, true)
end

# Monkey patches for Dir. See DirMonkeyPatches above for more details.
module DirInstanceMonkeyPatches
def each(*args, &block)
if block
Expand Down

0 comments on commit 43a3e5e

Please sign in to comment.