rocaml – Write Ruby extensions in OCaml
OCaml (short for Objective Caml) is an object oriented implementation of Caml, a derivative of ML. Like Ruby, it's an open source language, but it provides extremely high performance (at least 50% that of compiled C code, in general) and features static typing. You can learn more, and look at code examples, at OCaml's Wikipedia entry.
Mauricio Fernandez of Eigenclass has put together rocaml (readme), a bridge between Ruby and OCaml that lets you write Ruby extensions in OCaml. It handles the type conversions for you and creates boilerplate code that registers Ruby methods and wraps the calls to your OCaml code. Currently rocaml is considered to be "pre-release" but it seems to work okay, and it's certainly worth having a play with.