Hi,

In message "Re: [ruby-core:27074] [Bug #2449] StringIO#ungetc behavior is contrary to its spec"
    on Mon, 7 Dec 2009 05:12:42 +0900, Vladimir Sizikov <redmine / ruby-lang.org> writes:
|
|The spec for StringIO#ungetc() states: "Pushing back behind the beginning of the buffer string is not possible. Nothing will be done if such an attempt is made.".

Spec has changed for 1.9:

 call-seq:
   strio.ungetc(string)   -> nil

 Pushes back one character (passed as a parameter) onto *strio*
 such that a subsequent buffered read will return it.  There is no
 limitation for multiple pushbacks including pushing back behind the
 beginning of the buffer string.

1.8.7 inherits the behavior from 1.9, but spec statement has not been
updated.

							matz.