From: Patrick Hurley Date: 2006-04-02T11:59:45+09:00 Subject: Re: new to ruby.. need a code On 4/1/06, Robin Stocker wrote: > Hi, > > > links.each do |l| > > # resolve relative paths (there is probably a better way) > Yes there is, see below :) > > > link = URI.parse(l) > > link.scheme = 'http' unless link.scheme > > link.host = uri.host unless link.host > > link.path = uri.path + link.path unless link.path[0] == ?/ > > link = URI.parse(link.to_s) > link = uri.merge(l) > > Robin > > Thanks I knew there had to be :-), I don't use URI much. pth