Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

IO::Buffer#values

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

Returns an array of values of buffer_type starting from offset.

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

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