Pathname is scheduled to be moved from stdlib to core in Ruby v4.
RBS also needs to move the type definitions from stdlib to core.
Since the move from stdlib to core has already been done for set and rubygems, I propose to move it in the same way.
https://bugs.ruby-lang.org/issues/17473