[ruby-core:123805] [Ruby Bug#21686] In combination with IO#ungetbyte, the write position may become unpredictable.