[ruby-core:115141] [Ruby master Bug#19969] Regression of memory usage with Ruby 3.1