That should be in the standard lib for coolness and ruby-ish-ness :)

> class Numeric
>    def of &block
>      Array.new(to_i).map &block
>    end
> end
> 
> list = 42.of{ those }
> 
> a @ http://codeforpeople.com/

-- 
Posted via http://www.ruby-forum.com/.