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#get_values

get_values(buffer_types, offset) → array

Similar to get_value, except that it can handle multiple buffer types and returns an array of values.

Example
string = [1.5, 2.5].pack('ff')
IO::Buffer.for(string).get_values([:f32, :f32], 0)
# => [1.5, 2.5]
See also #get_value #hexdump #get_string #inspect also in 4.0 · 3.4 · 3.3 · 3.2