summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-09-25 03:59:12 (GMT)
committerJeremy Evans <code@jeremyevans.net>2019-11-17 23:00:25 (GMT)
commitffd0820ab317542f8780aac475da590a4bdbc7a8 (patch)
tree6a5d774933c15fd2b9ea948bd3ae2fa587faaf82 /enum.c
parentc5c05460ac20abcbc0ed686eb4acf06da7a39a79 (diff)
Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2476
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/enum.c b/enum.c
index 829d67a..0653280 100644
--- a/enum.c
+++ b/enum.c
@@ -647,7 +647,6 @@ enum_to_a(int argc, VALUE *argv, VALUE obj)
VALUE ary = rb_ary_new();
rb_block_call(obj, id_each, argc, argv, collect_all, ary);
- OBJ_INFECT(ary, obj);
return ary;
}
@@ -657,7 +656,6 @@ enum_hashify(VALUE obj, int argc, const VALUE *argv, rb_block_call_func *iter)
{
VALUE hash = rb_hash_new();
rb_block_call(obj, id_each, argc, argv, iter, hash);
- OBJ_INFECT(hash, obj);
return hash;
}
@@ -1245,7 +1243,6 @@ enum_sort_by(VALUE obj)
buf = rb_ary_tmp_new(SORT_BY_BUFSIZE*2);
rb_ary_store(buf, SORT_BY_BUFSIZE*2-1, Qnil);
memo = MEMO_NEW(0, 0, 0);
- OBJ_INFECT(memo, obj);
data = (struct sort_by_data *)&memo->v1;
RB_OBJ_WRITE(memo, &data->ary, ary);
RB_OBJ_WRITE(memo, &data->buf, buf);
@@ -1270,7 +1267,6 @@ enum_sort_by(VALUE obj)
}
rb_ary_resize(ary, RARRAY_LEN(ary)/2);
RBASIC_SET_CLASS_RAW(ary, rb_cArray);
- OBJ_INFECT(ary, memo);
return ary;
}