The return function is enumerable when a block is not specified, mainly used when combining functions from an enumerated class. Like this:
abc = %w[abc] p abc.map.with_index{|item, index| [item, index]} #=> [["a", 0], ["b", 1], ["c", 2]]
edit:
I think that my own understanding of this behavior is too limited to give a correct understanding of the inner workings of Ruby. I think the most important thing to note is that the arguments are passed in the same way as for Procs. That way, if the array is passed, it will be automatically "splatted" (best word for this?). I think the best way to get an understanding is to simply use some simple functions that return a list and start experimenting.
abc = %w[abcd] p abc.each_slice(2) #<Enumerator: ["a", "b", "c", "d"]:each_slice(2)> p abc.each_slice(2).to_a #=> [["a", "b"], ["c", "d"]] p abc.each_slice(2).map{|x| x} #=> [["a", "b"], ["c", "d"]] p abc.each_slice(2).map{|x,y| x+y} #=> ["ab", "cd"] p abc.each_slice(2).map{|x,| x} #=> ["a", "c"] # rest of arguments discarded because of comma. p abc.each_slice(2).map.with_index{|array, index| [array, index]} #=> [[["a", "b"], 0], [["c", "d"], 1]] p abc.each_slice(2).map.with_index{|(x,y), index| [x,y, index]} #=> [["a", "b", 0], ["c", "d", 1]]