I have an array of filenames in ruby. I want to select the filename that contains a specific string in it
for example
array = ["/some/place/once.txt", "/some/place/two.txt","/some/place/three.txt"]
and i want to select only the filename that has the word "two" in it
so I want to get filename = array.select { |e| e.include? "two" }
but for some reason filename contains everything that is in array. How to make it work?