[ruby-core:118428] [Ruby master Bug#20605] PRs with backported fix for https://github.com/ruby/ruby/pull/11036 to Ruby 3.3 and 3.2