From: Robert Dober Date: 2009-06-01T22:36:38+09:00 Subject: Re: Quine (#207) On Mon, Jun 1, 2009 at 3:20 PM, Brian Candler wrote: > James Gray wrote: >> On May 31, 2009, at 10:59 PM, Jorrel wrote: >> >>> Is using File considered cheating? >>> >>>    puts File.readlines __FILE__ >> >> It usually is, yes. > > I'd suggest you pipe the source code into the ruby interpreter: > >    cat quine.rb | ruby > >    cat quine.rb | ruby | diff -u quine.rb - > > That eliminates tricks with __FILE__ and $0. > Good thinking, but the "optimal" solution still passes ;) > xxx | ruby | diff -u xxx - N.B. this ">" ain't a quote ;) Robert -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]