Ruby implementation of Erlang-C functions