summaryrefslogtreecommitdiff
path: root/ext/stringio/stringio.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-18 12:39:49 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-31 16:24:02 +0900
commitebc884461b0d8c3144c05abeb793e381903de6b2 (patch)
tree7e8a219823978fcde3e1de5d6e33e34fe975d3a9 /ext/stringio/stringio.c
parent3895e548bd2d75cdf47cd247e84d6071247dd3b3 (diff)
[ruby/stringio] Remove taint support
Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/stringio/commit/60ee9ccd95
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r--ext/stringio/stringio.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index d6db112069..4dd5fb416a 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -623,7 +623,6 @@ strio_copy(VALUE copy, VALUE orig)
strio_free(DATA_PTR(copy));
}
DATA_PTR(copy) = ptr;
- OBJ_INFECT(copy, orig);
RBASIC(copy)->flags &= ~STRIO_READWRITE;
RBASIC(copy)->flags |= RBASIC(orig)->flags & STRIO_READWRITE;
++ptr->count;
@@ -1443,7 +1442,6 @@ strio_write(VALUE self, VALUE str)
if (ptr->pos == olen) {
if (enc == ascii8bit || enc2 == ascii8bit) {
rb_enc_str_buf_cat(ptr->string, RSTRING_PTR(str), len, enc);
- OBJ_INFECT(ptr->string, str);
}
else {
rb_str_buf_append(ptr->string, str);
@@ -1452,9 +1450,7 @@ strio_write(VALUE self, VALUE str)
else {
strio_extend(ptr, ptr->pos, len);
memmove(RSTRING_PTR(ptr->string)+ptr->pos, RSTRING_PTR(str), len);
- OBJ_INFECT(ptr->string, str);
}
- OBJ_INFECT(ptr->string, self);
RB_GC_GUARD(str);
ptr->pos += len;
return len;