From: "NAKAMURA, Hiroshi" Date: 2010-04-29T07:25:22+09:00 Subject: [ruby-core:29865] Re: [Bug #2449] StringIO#ungetc behavior is contrary to its spec Hi, On Wed, Apr 28, 2010 at 23:23, Yusuke ENDOH wrote: >>>> Do you mean this IO change (multiple pushbacks and behind the >>>> beginning) should be backported to 1.8? >>> >>> I move this ticket to 1.8. >>> But it may be difficult for 1.8 that uses C's stdio to implement IO. >> >> Yes. So I think that the following is not correct. >> >> | ?There is no >> | ?limitation for multiple pushbacks including pushing back behind the >> | ?beginning of the buffer string. > > The above spec is valid just for StringIO#ungetc. I don't see the reason. As far as I understand, Matz indicated 'This spec is right for StringIO because its the spec of IO'. The latter part is true for 1.9, but not true for 1.8 (and must be hard to be true as you know). So still the former part couldn't be true for 1.8. We don't have much interest to this trivial behavior. Can't you accept my proposal? It requires less work for changes. :-) Regards, // NaHi