From: Emeka Patrick Date: 2012-06-24T10:38:28+09:00 Subject: Stripping symbol character from hash turned to array Hi, new to programming and Ruby and trying to work through some problems and understand the language. Right now I'm doing work with hashes and ran into a question. Took this Hash people = { :fred => 23, :joan => 18, :pete => 54 } and turned it to an Array via "people_array = people.to_a" now I have people_array = [[:fred, 23], [:joan, 18], [:pete, 54]] If I want to keep it as a nested Array how can I go about stripping the ":" from what used to be the key. Please help and if possible, explain. Thanks, Emeka PS I've tried gsub, but I get undefined method for Symbol 1.9.3p194 :140 > people_array.each do |k, v| 1.9.3p194 :141 > k.gsub!(':', '') 1.9.3p194 :142?> end NoMethodError: undefined method `gsub!' for :fred:Symbol from (irb):141:in `block in irb_binding' from (irb):140:in `each' -- Posted via http://www.ruby-forum.com/.