From: Peter Hickman Date: 2010-07-13T18:01:42+09:00 Subject: Re: I'm trying to get the keys, but why values appear? If you want the keys only you can do this "personal_information.keys.each do |key|" or "personal_information.each_key do |key|" This, however, "personal_information.each do |key|" returns each element of the hash as an array in the form [key, value] Look here for the documentation ( http://www.ruby-doc.org/core/classes/Hash.html ), in fact this should be the first place you look when you have a problem.