From: Alan Chen Date: 2002-12-14T03:09:17+09:00 Subject: Re: Can an .rbx file send it's own code? On Sat, Dec 14, 2002 at 02:27:03AM +0900, Chris Pine wrote: > Hello, > > I was wondering if there's a way to make a web page (generated in Ruby) with > a link which, when clicked, would send itself... not the generated page, but > the actual page-generating Ruby program, the whole .rbx file. > > I can't figure out any easy way to do this... any thoughts? > > Chris Without getting into all of the cgi processing... script = nil open('selfname', 'r') { |fh| script = fh.read } send the appopriate header and puts script. Theres a variable that contains the name of the script, but I can recall what it is right now. -- Alan Chen Digikata Computing http://digikata.com