Skip to content

Removing event hooks can AIOOB #2903

Closed
Closed
@enebo

Description

@enebo

Originally from PR #2604 ... I am solving this differently than the original PR. In addition to the original reporters problem of seeing us walk off the edge of the newHooks array this method was also broken because it would not work if the contained hook was not contained in the list.

Testing a fix for this as I write the description. Tip of the hat to @gsamokovarov for the simple reproduction:

require 'coverage'
Coverage.start

set_trace_func proc { |*args| p args }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions