Sha256: 9ec3ec048fe47d6ce0ce06062309926dbac350510e977dda2eab2c11383c4a58
Contents?: true
Size: 253 Bytes
Versions: 48
Compression:
Stored size: 253 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
48 entries across 48 versions & 3 rubygems