I have a multidimentional array in ruby, like so: [[a, b, c], [d, e, f], [g, h, i]] and I want to remove spaces in every second object of each array with this function .gsub!(/\s+/, ""). So it is basically like doing: [[a, b.gsub!(/\s+/, ""), c], [d, e.gsub!(/\s+/, ""), f], [g, h.gsub!(/\s+/, ""), i]]
I am a little bit confused, how can I do that ?