News for hackers. Stuff that matters.
Re:Ruby One-Liners by e12e on Saturday September 14, 2019 @03:02AM (#20969357)
Why shuffle? Does it do something rand doesn't already do?

At any rate, would probably want to use https://ruby-doc.org/stdlib-2.5.1/libdoc/securerandom/rdoc/S... for password generation.

Also, I think you might just want an alphabet and use sample: https://ruby-doc.org/core-2.5.1/Array.html#method-i-sample

# unsure if you need a:

require 'securerandom'

(33..126).sample(14, random: SecureRandom).map(&:chr).join

Re:Ruby One-Liners by Axsuul on Saturday September 14, 2019 @02:19PM (#20972691)
You're right, probably doesn't need shuffle :)