Initially it's a copypasta from ruby core. Goal is to add support for sparse matrices.