John Maclean wrote: > Why does the output stop at eight. Shouldn't the class of nine be > shown also? > > 9.times {|x| print x , " ", x.class, "\n" } > 0 Fixnum > 1 Fixnum > 2 Fixnum > 3 Fixnum > 4 Fixnum > 5 Fixnum > 6 Fixnum > 7 Fixnum > 8 Fixnum > => 9 You might want another approach: 1.upto(9) {|x| print x , " ", x.class, "\n" } -- Posted via http://www.ruby-forum.com/.