Closed
Description
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 }