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