Fix packed_data.rdoc

This commit is contained in:
Benoit Daloze 2023-04-15 16:09:04 +02:00 committed by GitHub
parent 19aa30d5d5
commit 4dc2e5a850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ for one element in the input or output array.
s = [0, 1, -1].pack('c*') # => "\x00\x01\xFF"
s.unpack('c*') # => [0, 1, -1]
- <tt>'C'</tt> - 8-bit signed integer
- <tt>'C'</tt> - 8-bit unsigned integer
(like C <tt>unsigned char</tt>):
[0, 1, 255].pack('C*') # => "\x00\x01\xFF"
@ -233,7 +233,7 @@ for one element in the input or output array.
# => [67305985, 4244504319]
==== Other \Integer Directives
:
- <tt>'U'</tt> - UTF-8 character:
s = [4194304].pack('U*')