Created
April 14, 2015 13:49
-
-
Save granolocks/359b1255bda2b2012fe3 to your computer and use it in GitHub Desktop.
worst possible ruby
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
| p = Proc.new do | |
| (0..32). | |
| to_a. | |
| map do |_| | |
| ( | |
| ('a'..'z').to_a + | |
| %w{ ' " ; : \{ \} , . - _ = + ( ) * & ^ % $ # @ ! } + | |
| [' '] | |
| ).shuffle.first | |
| end | |
| end | |
| until( | |
| until( z = p.call.join; `ruby -c -e #{z}`=="Syntax OK"); end | |
| begin | |
| eval(z) | |
| rescue | |
| false | |
| end | |
| ) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment