I have the following code:
vara=[{:command=>"a"},{:command=>"b"},{:command=>"c"}]
varb=vara.clone
varb.each do |var|
var[:command] = "d"
end
puts vara
I've also tried using:
varb=vara.dup
the result i get is:
{:command=>"d"}
{:command=>"d"}
{:command=>"d"}
how can i adjust this so my vara has the original data i entered in the top of the script?