From: Comfort Eagle Date: 2006-11-30T21:51:15+09:00 Subject: Re: creating directory "http://example.com" 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/.