Ruby tutorial using each block instead of for