From: Justin Collins Date: 2006-04-12T01:26:03+09:00 Subject: Re: Oddities of Iteration Nathan Olberding wrote: > I'm working on a CGI script that iterates through a list of items of a > class I've defined (class Report). Report::to_s just returns the string > "yay!" for testing purposes. > > When I run this code: > --------------------- > > puts "
Reports:" > puts "
    " > reports.each do |x| > begin > puts "
  1. " + x.to_s + "
  2. " > rescue > puts "
  3. ...
  4. " > end > end > puts "
" > puts "
" > Just as a side note, you'll probably find the CGI standard library easier to use than typing out the strings: http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/classes/CGI.html -Justin