Skip to content
instance method

IO::Buffer#inspect

() -> ::String
inspect → string

Inspect the buffer and report useful information about it’s internal state. Only a limited portion of the buffer will be displayed in a hexdump style format.

Example
buffer = IO::Buffer.for("Hello World")
puts buffer.inspect
# #<IO::Buffer 0x000000010198ccd8+11 EXTERNAL READONLY SLICE>
# 0x00000000  48 65 6c 6c 6f 20 57 6f 72 6c 64                Hello World
See also #initialize_copy #internal? #hexdump #locked also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1