In the code path through __hooks where type and events are both non-nil,
hooks is a value in the @hooks instance variable, and calling #select!
on it modifies the array inside @hooks as well.
This was causing hooks to mysteriously disappear when hooks had disjoint
event types.
In the code path through __hooks where type and events are both non-nil, hooks is a value in the @hooks instance variable, and calling #select! on it modifies the array inside @hooks as well.
This was causing hooks to mysteriously disappear when hooks had disjoint event types.
Use #select instead.