FFI Conversion of jnxlibc to ruby