1)
irb(main):011:0> a=(0..20).to_a
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
19, 20]
irb(main):012:0> print a.inspect
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 
20]
=> nil


2)irb(main):013:0>  a=(0..20).to_a
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
19, 20]
irb(main):014:0> a.each{|e| print "#{e}\t"}
0       1       2       3       4       5       6       7       8 
9       10      11      12      13      14      15      16      17
18      19      20
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
19, 20]

Which one do you really want 1) or 2)?


Li




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