Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

IO::Buffer#values

values(data_type, [offset, [count]]) → array

Returns an array of values of data_type starting from offset.

If count is given, only count values will be returned.

Example:

Example
IO::Buffer.for("Hello World").values(:U8, 2, 2)
# => [108, 108]
See also #valid? #write #transfer #xor! also in 4.1 · 4.0 · 3.4 · 3.3