Whoa! Lots of typos there. The code should look like this:

require 'validator'
#targets is an array of URIs to the pages we want to validate
results=Hash.new
targets.each{|t|
     res=W3CHTMLValidator.validate_page(t)
     #any page with problems goes into the hash
     results[t]=res.messages unless res.ok?
}
#do something with the results

Look what happens when you post while refactoring.
Cheers,
V.-
-- 
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.