add loop do example to ruby