class StringIO

用于字符串的 IO 流,访问方式类似于 IO;请参见 IO

关于示例

本页上的示例假设已 require 了 StringIO

require 'stringio'