ruby solutions for 0001 0029 0034