ruby/sample/all-ruby-quine.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 строки
1.0 KiB
Ruby
Исходник Обычный вид История

eval($s=("t='eval($s=('+d=34.chr;s=3
2.chr+$s*i=8;v=$VERSION||eval('begin;v=V
ERSION;rescue;v||RUBY_VERSION;end');f=('?'*8
+'A|'+'?'*20+'G?c'+'?'*15+'A@CXx@~@_`OpGxCxp@~pO
xS|O~G?c?q?xC`AP|q?x_|C_xC_xO@H@cG?G?qA|_|_`GCpOxC|H
NFccqq@`_|OF@`?q?x_@x_x_`GB`O``O~G?C@qCxCxP@D@|G~C?pO|C?
pO|C?AP|A~HNN`ccxC|Q@L@B"+"GpGpc@p?x_`GB`???_@FO|OB@
xC|P`@?c?q?HPx@~@_`G@`????@L^`?q?x?xq@|_|O~GC`
xA~@_@GBD').unpack('c*');w=4+v.length*u=
15;r=10.chr;j=0;while-24+w*u>i=1+i
;x=i%w;x>0||t=t+d+'+'+r+d;k=
i/w%12>2&&x%u>3&&x%u+i
/w*11-34+('-._'.
index(c=v[
x/u,1]
)||c.hex +3)*99|
|0; k=f [k/6 ][k%
6]; t=t +s[
k*j =k+ j,1
]end;pr int (t+
d+' ).s pli
t.j oin [0,
609 ])# Y.E. '+r)
").split .join)#