diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-10-26 21:08:55 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-10-26 12:55:45 +0000 |
commit | f513863c8186ebfbc2a4264929287f982fd147ea () | |
tree | e485d1fd3639e743483d6bab10e53b9779922e2c /ext | |
parent | 393c5df00855829aaa7ce2f9964be673f5373ae0 (diff) |
[ruby/stringio] Unreachable after an invalid argument exception
https://.com/ruby/stringio/commit/a2aab4721c
-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); } |