Bob Showalter wrote:
> 
> Range has a to_a method, but it won't work for 'Name 1'..'Name 20' (it
> does for 'Name 01'..'Name 20' as pointed out).
> 
> I would use
> 
>    arr = (1..20).collect{|i| "name #{i}"}

Thank all for your kindly inputs.

li

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