Created
March 27, 2010 19:47
-
-
Save JoshCheek/346318 to your computer and use it in GitHub Desktop.
4 ruby quines in 1, based off solutions at http://tinyurl.com/yhdrdnd , only the printf one is from my own brain
This file contains hidden or 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
| printf a="%1$s a=%2$s , '%1$s' , a.inspect" , 'printf' , a.inspect |
This file contains hidden or 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
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| printf a="%1$s a=%2$s , '%1$s' , a.inspect" , 'printf' , a.inspect | |
| quine |
This file contains hidden or 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
| DATA.rewind | |
| puts DATA.readlines | |
| __END__ | |
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| printf a="%1$s a=%2$s , '%1$s' , a.inspect" , 'printf' , a.inspect | |
| quine |
This file contains hidden or 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
| #!/bin/cat | |
| DATA.rewind | |
| puts DATA.readlines | |
| __END__ | |
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| puts( (code = <<quine)[/\A.*$/] , code , 'quine' ) | |
| printf a="%1$s a=%2$s , '%1$s' , a.inspect" , 'printf' , a.inspect | |
| quine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment