in recent versions of Ruby, many methods in Enumerable return an Enumerator when they are called without a block:
Enumerable
Enumerator
[1,2,3,4].map #=>
Another approach might be:
class Array def double(&block) map {|y| y*2 }.each(&block) end end