Not to anecdote too hard, but the practice of doing type signatures out-of-line that you are describing is my absolute least favorite part of OCaml, which is otherwise a very lovely language. As for C++, it has enough other stuff going on that I probably can't say the header files are my least favorite feature, but they certainly don't make life easy. I think it makes sense to challenge that decision from an ergonomics standpoint, even if it makes sense within the constraints the Ruby core team has decided upon.
I very much like Ocaml signature files. Jane street recommends using them, as an example. There’s no other way to communicate the high level contract of a module. With type signatures that are in line with the code, the high level contract gets lost.