Skip to content
instance method

IO::Buffer#null?

() -> bool
null? → true or false

If the buffer was freed with free, transferred with transfer, or was never allocated in the first place.

Example
buffer = IO::Buffer.new(0)
buffer.null? #=> true

buffer = IO::Buffer.new(4)
buffer.null? #=> false
buffer.free
buffer.null? #=> true
See also #not! #or! #mapped? #pread also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1