From: Levin Alexander Date: 2006-02-06T20:32:13+09:00 Subject: Re: Adding user input to a hash On 2/6/06, John Maclean wrote: > if user_input.chomp! != "qq"> ask_list.each_value = user_input # this line don't work How could it, you are trying to assign to a method. Try this: questions = %w{Name Job} answers = questions.inject({}) { |hash, question| print "#{question}: " answer = gets.chomp break hash if answer == "q" hash[question] = answer hash } p answers -Levin