From: Mike Stok Date: 2006-02-06T20:32:47+09:00 Subject: Re: Adding user input to a hash On 6-Feb-06, at 6:16 AM, John Maclean wrote: > def testwrite > ask_list = { > 'Your name' => 'Nil', > 'Your dob' => 'Nil', > } > ask_list.each_key { > |z| puts "#{z} : " > user_input = gets.chomp > if user_input.chomp! != "qq" > ask_list.each_value = user_input # this line don't work Do you mean ask_list[z] = user_input here? > end > } > end > > testwrite Mike -- Mike Stok http://www.stok.co.uk/~mike/ The "`Stok' disclaimers" apply.