class Prism::Serialize::FastStringIO

:nodoc:
StringIO is synchronized and that adds a high overhead on TruffleRuby.

def eof?

def eof?
  @pos >= @string.bytesize
end

def getbyte

def getbyte
  byte = @string.getbyte(@pos)
  @pos += 1
  byte
end

def initialize(string)

def initialize(string)
  @string = string
  @pos = 0
end

def read(n)

def read(n)
  slice = @string.byteslice(@pos, n)
  @pos += n
  slice
end