Sha256: 0bc0128e2fe55f7270c3eef1ce02b2c3c4063b4024d9abcaadb4d09b743a6ec1
Contents?: true
Size: 254 Bytes
Versions: 7
Compression:
Stored size: 254 Bytes
Contents
module SecureRandom def self.uuid 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.gsub(/[xy]/) do |ch,| %x{ var r = Math.random() * 16 | 0, v = ch == "x" ? r : (r & 3 | 8); return v.toString(16); } end end end
Version data entries
7 entries across 7 versions & 1 rubygems