[ruby-core:125441] [Ruby Feature#22060] Improve Pathname by migrating internal methods to pathname.c