I tried to backport cf7d07570f50ef9c16007019afcff11ba6500d70 and c6aa65430fbb94651f4d15e2a976f59b5475ca19 into ruby_3_1 branch, but the test test_utf8_method_names failed. Maybe some more changesets are needed. I will investigate it further.
@nagachika (Tomoyuki Chikanaga) it's my fault. For backporting purpose cf7d07570f50ef9c16007019afcff11ba6500d70 alone should be backported and c6aa65430fbb94651f4d15e2a976f59b5475ca19 should be ignored.