Ruby port of totally_lazy