diff options
-rw-r--r-- | ext/stringio/stringio.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -952,7 +952,10 @@ strio_ungetc(VALUE self, VALUE c) enc = rb_enc_get(ptr->string); len = rb_enc_codelen(cc, enc); - if (len <= 0) rb_enc_uint_chr(cc, enc); rb_enc_mbcput(cc, buf, enc); return strio_unget_bytes(ptr, buf, len); } |