So far, we've discussed extending Ruby by adding routines written in C.
However, you can write extensions in just about any language, as long
as you can bridge the two languages with C. Almost anything is
possible, including awkward marriages of Ruby and C++, Ruby and Java,
and so on.
But you may be able to accomplish the same thing without resorting to C
code. For example, you could bridge to other languages using
middleware such as CORBA or COM. See the section on Windows automation
beginning on page 164 for more details.