diff options
author | Jeremy Evans <[email protected]> | 2019-09-24 20:59:12 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2019-11-18 01:00:25 +0200 |
commit | ffd0820ab317542f8780aac475da590a4bdbc7a8 () | |
tree | 6a5d774933c15fd2b9ea948bd3ae2fa587faaf82 /class.c | |
parent | c5c05460ac20abcbc0ed686eb4acf06da7a39a79 (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: Merged: https://.com/ruby/ruby/pull/2476
-rw-r--r-- | class.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -205,7 +205,6 @@ rb_class_boot(VALUE super) RCLASS_SET_SUPER(klass, super); RCLASS_M_TBL_INIT(klass); - OBJ_INFECT(klass, super); return (VALUE)klass; } @@ -511,8 +510,6 @@ make_metaclass(VALUE klass) while (RB_TYPE_P(super, T_ICLASS)) super = RCLASS_SUPER(super); RCLASS_SET_SUPER(metaclass, super ? ENSURE_EIGENCLASS(super) : rb_cClass); - OBJ_INFECT(metaclass, RCLASS_SUPER(metaclass)); - return metaclass; } @@ -851,8 +848,6 @@ rb_include_class_new(VALUE module, VALUE super) else { RBASIC_SET_CLASS(klass, module); } - OBJ_INFECT(klass, module); - OBJ_INFECT(klass, super); return (VALUE)klass; } @@ -867,7 +862,6 @@ ensure_includable(VALUE klass, VALUE module) if (!NIL_P(rb_refinement_module_get_refined_class(module))) { rb_raise(rb_eArgError, "refinement module is not allowed"); } - OBJ_INFECT(klass, module); } void @@ -1660,12 +1654,6 @@ singleton_class_of(VALUE obj) RCLASS_SERIAL(klass) = serial; } - if (OBJ_TAINTED(obj)) { - OBJ_TAINT(klass); - } - else { - FL_UNSET(klass, FL_TAINT); - } RB_FL_SET_RAW(klass, RB_OBJ_FROZEN_RAW(obj)); return klass; |