From: Aaron Patterson Date: 2007-10-22T11:34:20+09:00 Subject: Re: Self-replicating Ruby On Mon, Oct 22, 2007 at 11:25:02AM +0900, Frank J. Lhota wrote: > Dear Ruby fans, > > A common Lisp exercise is to write a Lisp program that writes its own > source code to standard output. Reading from a source file is not > permitted. > > This leads one to wonder: what is the smallest and / or most elegant > Ruby program that writes its own source code to standard output? As > with Lisp, reading from a file is not permitted. Given the nature of > the language, this problem should should have a lot of interesting > solutions. This is called a Quine, right? I can't beat Ryan Davis', so I'll just link to it. :-) http://blog.zenspider.com/archives/2006/09/ruby_quine__sli.html -- Aaron Patterson http://tenderlovemaking.com/