From: nobu.nokada@... Date: 2002-03-17T10:43:36+09:00 Subject: Re: Reading from a string Hi, At Sat, 16 Mar 2002 17:28:27 +0900, Thomas Sondergaard wrote: > > 1.7 has StringIO. Or you can find many StringIO, StrIO and so > > on. One of them (and the base of one in 1.7) is avaiable with > > CVS, rough/ext/stringio. > > Have you reimplemented the features like gets, readline, readlines, etc. > from IO or are you using the same implementation? Yes, except for <<, print, printf, puts. readline and readlines are also candidates for reuse, but gets is currently primitive for IO. > Wouldn't it be nice to > write these features once and for all and make them available to all > (future) stream implementers? Agree. Above 4 functions got exported already, so extension libraries can reuse them. > Would it be possible for you to refactor StringIO, so the implementation > of these convenience methods become available to other "IO" stream > implementers? Considerable. > IO RCR: http://www.rubygarden.org/article.php?sid=179 > IO RCR Discussion: http://www.rubygarden.org/ruby?IORCR Thanks, I'll read them. -- Nobu Nakada