I am novice in ruby and this question may seem silly for you, but I haven't found any reasonable explanation.
for example I have
array = [1,2,3,4,5,6]
and I'd like to make from this array of strings for some reasons
One of the ways is to do like this:
str_arr = array.map {|i| i.to_s}
at some web resource I've found the following:
array.map(&:to_s)
this does the same thing. Could someone explain what &:to_s
means ??