From: Logan Capaldo Date: 2005-11-21T23:28:39+09:00 Subject: Re: Net::HTTP.get(...) not working (still) ------=_Part_24511_20244766.1132583313344 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/21/05, Lady Michelle Bhaal wrote: > > Now that I've got my DNS back, I'm still getting the same basic error I > had last time around, complaining: undefined method 'line' > > Help? > > --- > > def fromWeb(site, url) > # get data from website > h =3D Net::HTTP.new(site, 80) > resp=3Dh.get(url) do > # process data > |line| > if /DGM_navigation/ =3D~ line do > # decode page lineage > step=3DArray.new > astep, line =3D getNextWord(line) > while astep !=3D nil > step.push(astep) > astep, line =3D getNextWord(line) > end > puts "Page Lineage" > indent =3D 0 > step.each do > |astep| > indent.each do > put " " > end > puts astep > indent +=3D 1 > end > end # end DGM_naviation > end # end Net::HTTP.get > end # end def fromWeb > > Minor syntax error on your part if's syntax is if cond ... end not if cond do # calls cond with the block ... end ------=_Part_24511_20244766.1132583313344--