Skip to content

Instantly share code, notes, and snippets.

@johnpena
Created May 17, 2011 05:52
Show Gist options
  • Select an option

  • Save johnpena/976017 to your computer and use it in GitHub Desktop.

Select an option

Save johnpena/976017 to your computer and use it in GitHub Desktop.
quine outputs itself
def quine(source)
puts source + '%Q{' + source + '}'
end
quine %Q{def quine(source)
puts source + '%Q{' + source + '}'
end
quine }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment