Skip to content

Commit

Permalink
Allow private invocation of ruby2_keywords (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Oct 8, 2021
1 parent e08fc02 commit 9427cdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ddtrace/profiling/ext/cthread.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def initialize(*args)
update_native_ids
yield(*t_args)
end
wrapped_block.ruby2_keywords if wrapped_block.respond_to?(:ruby2_keywords, true)
wrapped_block.send(:ruby2_keywords) if wrapped_block.respond_to?(:ruby2_keywords, true)

super(*args, &wrapped_block)
end
Expand Down Expand Up @@ -143,7 +143,7 @@ def start(*args)
::Thread.current.send(:update_native_ids)
yield(*t_args)
end
wrapped_block.ruby2_keywords if wrapped_block.respond_to?(:ruby2_keywords, true)
wrapped_block.send(:ruby2_keywords) if wrapped_block.respond_to?(:ruby2_keywords, true)

super(*args, &wrapped_block)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def initialize(*args, &block)
wrapped = lambda do |*thread_args|
block.call(*thread_args) # rubocop:disable Performance/RedundantBlockCall
end
wrapped.ruby2_keywords if wrapped.respond_to?(:ruby2_keywords, true)
wrapped.send(:ruby2_keywords) if wrapped.respond_to?(:ruby2_keywords, true)

super(*args, &wrapped)
end
Expand Down

0 comments on commit 9427cdc

Please sign in to comment.