Paul Lutus wrote:
> Comfort Eagle wrote:
> 
>>>>> "
>>   while url = res.fetch_row do
>>     puts url.gsub!( /^http:\/\//i, '')
>>   end
> 
> Well, it's easy enough to find out.
> 
> Before you apply "gsub!", test the class:
> 
>>   res = dbh.query("Select url FROM sites")
>>   while url = res.fetch_row do
> 
> puts url.class  # Add this. Read the result. Then decide what to do.

Brilliant.  Here's the output:
Array
Array
Array
Array
Array

Definitely not strings.

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