Created
March 13, 2012 14:44
-
-
Save thomcc/2029202 to your computer and use it in GitHub Desktop.
quine in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = [ | |
%q{puts "x = ["}, | |
%q{x.each_with_index {|s,i| puts "%q{" << s << "}" << (i == x.length-1 ? "" : ",") }}, | |
%q{puts "]"}, | |
%q{puts "x.map {|s| eval s}"} | |
] | |
x.map {|s| eval s} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment