summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-01-16 23:59:55 +0900
committergit <[email protected]>2024-01-16 15:06:22 +0000
commit6283ae8d369bd2f8a022bb69bc5b742c58529dec ()
treef2ffec9c57672d3a678598fbd0f672ba72bf0bc5 /ext
parentfef8ccff11a5f48eef9f11f61ff0baa165acfaff (diff)
[ruby/stringio] Update the coderange after overwrite
Fix https://bugs.ruby-lang.org/issues/20185 https://.com/ruby/stringio/commit/8230552a46
-rw-r--r--ext/stringio/stringio.c6
1 files changed, 6 insertions, 0 deletions
@@ -1464,8 +1464,14 @@ strio_write(VALUE self, VALUE str)
}
}
else {
strio_extend(ptr, ptr->pos, len);
memmove(RSTRING_PTR(ptr->string)+ptr->pos, RSTRING_PTR(str), len);
}
RB_GC_GUARD(str);
ptr->pos += len;