[ruby-core:121454] [Ruby Bug#21201] Performance regression when defining methods inside `refine` blocks