Submitted by anonymous (Wed Jun 26 18:06:18 UTC 2002)
a = IOString::new a.puts "Hello, world!" str = a.string # maybe a.to_s ? puts str b = IOString::open(str) str = b.gets puts str
I use this kind of structure to store parts of files in place, for parsing later... I created my own class to do this (which was easy, since I knew exactly which methods of IO I'd be talking to), but it seems like something that belongs in the standard library.
Comments | Current voting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
RCRchive copyright © David Alan Black, 2003-2005.
Powered by .
Try StringIO (matz, 2002-06-26 19:48:19)
matz.