Sha256: c84df939e5832e282c59c1da5ba308321ac7918002edff51f620726c57f5ea85
Contents?: true
Size: 334 Bytes
Versions: 189
Compression:
Stored size: 334 Bytes
Contents
unless defined? Random class Random def initialize(seed=Time.now.to_i) Kernel.srand(seed) @seed = seed end attr_reader :seed def rand(arg) Kernel.rand(arg) end def bytes(n) array = [] n.times do array << rand(256) end array.pack('C*') end end end
Version data entries
189 entries across 189 versions & 7 rubygems