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#empty?

empty? → true or false

If the buffer has 0 size: it is created by ::new with size 0, or with ::for from an empty string. (Note that empty files can’t be mapped, so the buffer created with ::map will never be empty.)

See also #each_byte #external? #each #free also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1