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