From: Rudolf Polzer Date: 2002-12-14T03:11:24+09:00 Subject: Re: Can an .rbx file send it's own code? Scripsit ille Chris Pine : > 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. Is it called via CGI? puts "Content-type: text/plain" puts IO.foreach(ENV['SCRIPT_FILENAME']) do |l| print l end Do that if a certain CGI parameter in the query string is set. What should I use instead of ENV['SCRIPT_FILENAME'] if the script is not necessarily called via CGI (instead, via the shell or using mod_ruby)? -- "Note that if I can get you to "su and say" something just by asking, you have a very serious security problem on your system and you should look into it." -- (By Paul Vixie, vixie-cron 3.0.1 installation notes)