Ruby port of pICO