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

to_s → string

Short representation of the buffer. It includes the address, size and symbolic flags. This format is subject to change.

Example
puts IO::Buffer.new(4) # uses to_s internally
# #<IO::Buffer 0x000055769f41b1a0+4 INTERNAL>
See also #slice #transfer #size #valid? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1