Ruby-ize code that doesn't need to be in C.