Shortest Ruby Quine [closed]

别来无恙 提交于 2019-11-28 21:25:07

Unfortunately RubyGarden doesn't exist anymore. Here are a couple of links to make up for it (the one Kevin posted is not the shortest one anymore by the way):

The first quines in Ruby

s="s=%c%s%c; printf s,34,s,34,10%c"; printf s,34,s,34,10

ruby quine slightly smaller than python quine

_="_=%p;puts _%%_";puts _%_

shortest nozero [sic!] ruby quine

puts <<2*2,2
puts <<2*2,2
2

Even shorter:

$><<IO.read($0)

15 characters, not including the newline

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!