I have an array in Ruby, like ["dog", "cat", bat"]. How can I get an array in which each element is passed to a particular method? For example, if the method reverses the input string, then I expect to get ["god", "tac", "tab"]. I know it's easy to iterate over the elements, pass them into the method, and put the results into an array. But is there a shorter way?
EDIT: I'd also not like to modify the original array.
mapwill not modify original array