Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support target: :block in TracePoint#enable #4624

Conversation

jeremyevans
Copy link
Contributor

This allows using the block passed to TracePoint#enable as the
target. This allows for a nicer API than creating a
proc/lambda for the block and using enable(target: block, &block).

This is implemented in vm_trace.c and not trace_point.rb to
prevent additional TracePoint events from being issued for
checking whether the target is :block.

Implements [Feature #16889]

This allows using the block passed to TracePoint#enable as the
target.  This allows for a nicer API than creating a
proc/lambda for the block and using enable(target: block, &block).

This is implemented in vm_trace.c and not trace_point.rb to
prevent additional TracePoint events from being issued for
checking whether the target is :block.

Fixes [Bug #16889]
@jeremyevans jeremyevans closed this Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant