Skip to content

Instantly share code, notes, and snippets.

@granolocks
Created April 14, 2015 13:49
Show Gist options
  • Select an option

  • Save granolocks/359b1255bda2b2012fe3 to your computer and use it in GitHub Desktop.

Select an option

Save granolocks/359b1255bda2b2012fe3 to your computer and use it in GitHub Desktop.
worst possible ruby
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