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

() -> ::String
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 #source #valid? #slice #values also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1