Friday, August 23, 2002, 2:19:53 PM, you wrote:

D> Can I ask what the advantage of storing it as a Struct is?

D> In all my Ruby/DBI code, I do something like this:

D>     def select(sql)
D>         sth = $dbh.prepare(sql)
D>         sth.execute
D>         results = []
D>         sth.fetch_hash { |row| results << row.dup }
D>         sth.finish
D>         results
D>     end

D> Is there any advantage to having it be a Struct instead of an
D> Array of Hash'es?
I think there is no advantage, but I really like this syntax:
people.each { |man| puts "#{man.name} #{man.surname}" }

This one is not so nice, isn't it?
people.each { |man| puts "#{man['name']} #{man['surname']}" }

-- 
Best regards,
 Eugene [team Enticla]               mailto:Eugene.Scripnik / itgrp.net