I am new to coding and am trying to learn Ruby. I am working in a Rake. What should I use to ensure that the random selection never repeats the same response back to back?
array = ["1", "2", "3", "4", "5"]
task :array do
array = ["1", "2", "3", "4", "5"]
ap(array.sample)
end