diff options
author | Peter Zhu <[email protected]> | 2024-08-16 10:27:28 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-08-16 16:12:49 -0400 |
commit | 2fe6a4f84d2bcf97d3be9bffa5f3232604201f55 (patch) | |
tree | a02da513d5d29943754f95ead308b32a45970af0 /test/ruby/test_range.rb | |
parent | 77ac853c15ef64bfc663e4b91a0707b549b940eb (diff) |
Fix assertion error when TracePoint has incompatible events
TracePoints with incompatible events (i.e. events not in ISEQ_TRACE_EVENTS)
with a method target will fail an assertion error because it does not
filter for the supported events. For example, the following lines will
cause an assertion error:
def foo; end
# No arguments passed into TracePoint.new enables all ISEQ_TRACE_EVENTS
TracePoint.new {}.enable(target: method(:foo))
# Raise is not supported with a target
TracePoint.new(:raise, :return) {}.enable(target: method(:foo))
foo
Crashes with:
Assertion Failed: vm_insnhelper.c:7026:vm_trace:(iseq_local_events & ~(0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0020| 0x0040 | 0x0100 | 0x0200 | 0x4000 | 0x010000| 0x020000)) == 0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11390
Diffstat (limited to 'test/ruby/test_range.rb')
0 files changed, 0 insertions, 0 deletions