Fix stack overflow in `inject_dump_stats!` with prepended modules
`inject_dump_stats!` captured methods via `instance_method` (which returns the prepended module's version) then redefined them on the class with `bind_call`. When the captured prepended method called `super`, it resolved to the newly defined class method, creating an infinite recursion. Use an anonymous wrapper module with `super` instead of `bind_call` to correctly delegate through the method resolution order without cycles. Fixes #21587
D
Douglas Eichelberger committed
e836ef5679f8f473809635ca2869974294bfad9e
Parent: 599be9e