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

get_values(data_types, offset) → array

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

Example:

Example
string = [1.5, 2.5].pack('ff')
IO::Buffer.for(string).get_values([:f32, :f32], 0)
# => [1.5, 2.5]