lib/bson/object_id/uuid_convertable.rb in bson-objectid-to-uuid-0.1.0 vs lib/bson/object_id/uuid_convertable.rb in bson-objectid-to-uuid-0.1.1
- old
+ new
@@ -21,10 +21,10 @@
((timestamp >> 48) & 0x0FFF) | UUID_VERSION,
mid_counter | UUID_VARIANT,
(high_counter << 40) + machine_pid
]
- format('%06x-%04x-%04x-%04x-%012x', *bytes)
+ format('%08x-%04x-%04x-%04x-%012x', *bytes)
end
module ClassMethods
def legal?(string)
UUID_REGEX.match(string.to_s) ? true : super