Packing a UUID

How can I pack a UUID using the array.pack method? I need to send a UUID
through a UDP packet, and I can’t figure out how to do this, or
specifically, which directive to use. I tried H and h, but neither
really seemed to work.

Quoting Isaac W. [email protected]:

How can I pack a UUID using the array.pack method? I need to send a UUID
through a UDP packet, and I can’t figure out how to do this, or
specifically, which directive to use. I tried H and h, but neither
really seemed to work.

Take a look how it’s done here: GitHub - spectra/ruby-uuid: Creates UUIDs version 1, 3, 4, and 5 in pure ruby.