From: Aureliano Calvo Date: 2009-06-01T12:16:28+09:00 Subject: Re: [QUIZ] Quine (#207) --0016361e8856f8a95f046b40d9f2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I did something like that, but with parenthesis. s="s=%c%s%c;printf(s,34,s,34)";printf(s,34,s,34) It is based on the C quine that uses printf on the wikipedia page. On Sun, May 31, 2009 at 2:10 PM, Pascal J. Bourguignon < pjb@informatimago.com> wrote: > 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 > ----- > > > > > > -- > __Pascal Bourguignon__ > > --0016361e8856f8a95f046b40d9f2--