On this page
End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class · Ruby 3.2
StringIO
< Object
include Enumerable
include IO::generic_readable
include IO::generic_writable
49 instance methods
2 class methods
IO streams for strings, with access similar to IO; see IO.
About the Examples
Examples on this page assume that StringIO has been required:
Example
require 'stringio'
Class methods 2
Instance methods 49
#binmode
#close
#closed?
#closed_read?
#closed_write?
#close_read
#close_write
#each
#each_byte
#each_char
#each_codepoint
#each_line
#eof
#eof?
#external_encoding
#fcntl
#fileno
#flush
#fsync
#getbyte
#getc
#gets
#internal_encoding
#isatty
#length
#lineno
#lineno=
#pid
#pos
#pos=
#putc
#read
#readlines
#reopen
#rewind
#seek
#set_encoding
#set_encoding_by_bom
#size
#string
#string=
#sync
#sync=
#tell
#truncate
#tty?
#ungetbyte
#ungetc
#write
Constants
No documentation available