From: Heesob Park Date: 2009-06-01T11:59:04+09:00 Subject: Re: [QUIZ] Quine (#207) 2009/6/1 Pascal J. Bourguignon : > Robert Dober writes: > >> Ok, the shortest solution did not have much success, what about a long >> one then ;) >> >> http://pastie.org/495692 > > > $ echo ----- ; cat quine.rb ; echo ----- ; ruby quine.rb ; echo ----- > ----- > q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts > ----- > q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts > ----- > Here is a variant version of the above: puts (_="puts (_=%c%s%c)%%[34,_,34]")%[34,_,34] Regards, Park Heesob