Skip to content

Instantly share code, notes, and snippets.

@Pablo-Merino
Last active August 29, 2015 14:10
Show Gist options
  • Save Pablo-Merino/d56a942d13ced30e6952 to your computer and use it in GitHub Desktop.
Save Pablo-Merino/d56a942d13ced30e6952 to your computer and use it in GitHub Desktop.
Random extended ASCII String
def str(i)
(0...i).map { ((1..255).to_a.map { |i| i.chr(Encoding::UTF_8) unless i == " " }).sample }.join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment