Ruby: A script to take input and gives output (use of gets and puts) but with "chomp" this time