I'm trying to build a items array. I'm looping through a CSV file and when i find matches expanding the list of items. See code below:
items = Array.new
csv.each_with_index do |row,i|
items << ["a","b","c"].map {|x| row.to_s.gsub(/XXXXXXXXXX/, x.downcase)}
end
puts items.length
This is not returning to desired items array. Am I appended the results of map incorrectly to the array?
iin your example. Is it because it's just a simpler example?