TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
Show HN: Two line ruby quine
6 点
作者
madamepsychosis
将近 14 年前
Thought you might like this. This Ruby program makes an exact copy of itself.<p>c = "File.open('new.rb', 'w') {|f| f.write('c = ' + c.inspect + '\neval c') }"<p>eval c
1 comment
AndrewVos
将近 14 年前
Collapse
I think the use of eval is thought of as cheating. Also I seem to remember writing to files is also cheating?
评论 #2859398 未加载