Skip to content

Commit

Permalink
Update UUID documentation with RFC9562 links
Browse files Browse the repository at this point in the history
RFC9562 was released almost two weeks ago, so we can replace the "draft"
UUIDv7 URL with the final RFC URL too.  RFC9562 obsoletes RFC4122, so I
replaced its link as well.
  • Loading branch information
nevans committed May 21, 2024
1 parent 5a73c37 commit 1e41c3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/random/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def urlsafe_base64(n=nil, padding=false)
#
# The result contains 122 random bits (15.25 random bytes).
#
# See RFC4122[https://www.rfc-editor.org/rfc/rfc4122] for details of UUID.
# See RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv4.
#
def uuid
ary = random_bytes(16)
Expand Down Expand Up @@ -204,8 +204,7 @@ def uuid
# Note that this method cannot be made reproducible because its output
# includes not only random bits but also timestamp.
#
# See draft-ietf-uuidrev-rfc4122bis[https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/]
# for details of UUIDv7.
# See RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv7.
#
# ==== Monotonicity
#
Expand Down Expand Up @@ -242,7 +241,7 @@ def uuid
#
# Counters and other mechanisms for stronger guarantees of monotonicity are
# not implemented. Applications with stricter requirements should follow
# {Section 6.2}[https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-07.html#monotonicity_counters]
# {Section 6.2}[https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters]
# of the specification.
#
def uuid_v7(extra_timestamp_bits: 0)
Expand Down

0 comments on commit 1e41c3d

Please sign in to comment.