module Bundler::Random::Formatter

def alphanumeric(n = nil, chars: ALPHANUMERIC)

prng.alphanumeric(10, chars: [*"!".."/"]) #=> ",.,++%/''."
prng = Random.new
# or
Random.alphanumeric(4, chars: [*"0".."9"]) #=> "2952"

prng.alphanumeric(10) #=> "i6K93NdqiH"
prng = Random.new
# or
Random.alphanumeric #=> "2BuBuLf3WfSKyQbR"

require 'bundler/vendor/securerandom/lib/random/formatter'

The result may contain A-Z, a-z and 0-9, unless _chars_ is specified.

It may be larger in the future.
If _n_ is not specified or is nil, 16 is assumed.

consist of.
The argument _chars_ specifies the character list which the result is
string to be generated.
The argument _n_ specifies the length, in characters, of the alphanumeric

Generate a random alphanumeric string.
def alphanumeric(n = nil, chars: ALPHANUMERIC)
  n = 16 if n.nil?
  choose(chars, n)
end