summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-26 22:13:18 +0900
committergit <[email protected]>2024-10-26 13:20:34 +0000
commit484ea00d2e1c2f2409cf1b58575cdb2c298c6a45 ()
treebd9b20eb40e91f1d6e17c0776f75da535a82fd28 /ext
parentf513863c8186ebfbc2a4264929287f982fd147ea (diff)
[ruby/stringio] An empty string should be converted to empty in any encoding
https://.com/ruby/stringio/commit/ef03f9368d
-rw-r--r--ext/stringio/stringio.c1
1 files changed, 1 insertions, 0 deletions
@@ -961,6 +961,7 @@ strio_ungetc(VALUE self, VALUE c)
}
else {
StringValue(c);
enc = rb_enc_get(ptr->string);
enc2 = rb_enc_get(c);
if (enc != enc2 && enc != rb_ascii8bit_encoding()) {