From: Robin Stocker Date: 2006-04-02T10:55:03+09:00 Subject: Re: new to ruby.. need a code 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