Skip to content

Commit 964aa4a

Browse files
committed
Remove everything related to tainting
1 parent 44cf78f commit 964aa4a

File tree

4 files changed

+0
-144
lines changed

4 files changed

+0
-144
lines changed

lib/cext/include/ruby/internal/fl_type.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,6 @@ void rb_freeze_singleton_class(VALUE klass);
468468
#ifdef TRUFFLERUBY
469469
int rb_tr_flags(VALUE value);
470470
void rb_tr_add_flags(VALUE value, int flags);
471-
bool rb_tr_obj_taintable_p(VALUE object);
472-
bool rb_tr_obj_tainted_p(VALUE object);
473-
void rb_tr_obj_infect(VALUE a, VALUE b);
474471
#endif
475472
RBIMPL_SYMBOL_EXPORT_END()
476473

spec/tags/truffle/methods_tags.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,6 @@ fails:Public methods on IO should include timeout=
100100
fails:Public methods on IO should include to_path
101101
fails:Public methods on Integer should include ceildiv
102102
fails:Public methods on Kernel should not include =~
103-
fails:Public methods on Kernel should not include taint
104-
fails:Public methods on Kernel should not include tainted?
105-
fails:Public methods on Kernel should not include trust
106-
fails:Public methods on Kernel should not include untaint
107-
fails:Public methods on Kernel should not include untrust
108-
fails:Public methods on Kernel should not include untrusted?
109103
fails:Public methods on MatchData should include byteoffset
110104
fails:Public methods on MatchData should include deconstruct
111105
fails:Public methods on MatchData should include deconstruct_keys

src/main/c/cext/object.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -128,44 +128,6 @@ void rb_obj_call_init(VALUE object, int argc, const VALUE *argv) {
128128
RUBY_CEXT_INVOKE_NO_WRAP("rb_obj_call_init", object, rb_ary_new4(argc, argv), rb_block_proc());
129129
}
130130

131-
// taint status
132-
133-
VALUE rb_obj_tainted(VALUE obj) {
134-
return rb_funcall(obj, rb_intern("tainted?"), 0);
135-
}
136-
137-
VALUE rb_obj_taint(VALUE object) {
138-
return RUBY_INVOKE(object, "taint");
139-
}
140-
141-
VALUE rb_obj_untaint(VALUE obj) {
142-
return rb_funcall(obj, rb_intern("untaint"), 0);
143-
}
144-
145-
VALUE rb_obj_untrusted(VALUE obj) {
146-
return rb_funcall(obj, rb_intern("untrusted?"), 0);
147-
}
148-
149-
VALUE rb_obj_trust(VALUE obj) {
150-
return rb_funcall(obj, rb_intern("trust"), 0);
151-
}
152-
153-
VALUE rb_obj_untrust(VALUE obj) {
154-
return rb_funcall(obj, rb_intern("untrust"), 0);
155-
}
156-
157-
bool rb_tr_obj_taintable_p(VALUE object) {
158-
return polyglot_as_boolean(RUBY_CEXT_INVOKE_NO_WRAP("RB_OBJ_TAINTABLE", object));
159-
}
160-
161-
bool rb_tr_obj_tainted_p(VALUE object) {
162-
return RTEST(rb_obj_tainted(object));
163-
}
164-
165-
void rb_tr_obj_infect(VALUE a, VALUE b) {
166-
rb_warning("rb_obj_infect is deprecated and will be removed in Ruby 3.2.");
167-
}
168-
169131
// frozen status
170132

171133
VALUE rb_obj_frozen_p(VALUE object) {

src/main/java/org/truffleruby/core/kernel/KernelNodes.java

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
import org.truffleruby.language.RubyNode;
105105
import org.truffleruby.language.RubyRootNode;
106106
import org.truffleruby.language.WarnNode;
107-
import org.truffleruby.language.WarningNode;
108107
import org.truffleruby.language.arguments.RubyArguments;
109108
import org.truffleruby.language.backtrace.Backtrace;
110109
import org.truffleruby.language.backtrace.BacktraceFormatter;
@@ -1738,70 +1737,6 @@ protected RubyArray globalVariables() {
17381737

17391738
}
17401739

1741-
@CoreMethod(names = "taint")
1742-
public abstract static class KernelTaintNode extends CoreMethodArrayArgumentsNode {
1743-
1744-
@Specialization
1745-
protected Object taint(Object object,
1746-
@Cached("new()") WarningNode warningNode) {
1747-
if (warningNode.shouldWarn()) {
1748-
warningNode.warningMessage(
1749-
getSourceSection(),
1750-
"Object#taint is deprecated and will be removed in Ruby 3.2.");
1751-
}
1752-
return object;
1753-
}
1754-
1755-
}
1756-
1757-
@CoreMethod(names = "trust")
1758-
public abstract static class KernelTrustNode extends CoreMethodArrayArgumentsNode {
1759-
1760-
@Specialization
1761-
protected Object trust(Object object,
1762-
@Cached("new()") WarningNode warningNode) {
1763-
if (warningNode.shouldWarn()) {
1764-
warningNode.warningMessage(
1765-
getSourceSection(),
1766-
"Object#trust is deprecated and will be removed in Ruby 3.2.");
1767-
}
1768-
return object;
1769-
}
1770-
1771-
}
1772-
1773-
@CoreMethod(names = "tainted?")
1774-
public abstract static class KernelIsTaintedNode extends CoreMethodArrayArgumentsNode {
1775-
1776-
@Specialization
1777-
protected boolean isTainted(Object object,
1778-
@Cached("new()") WarningNode warningNode) {
1779-
if (warningNode.shouldWarn()) {
1780-
warningNode.warningMessage(
1781-
getSourceSection(),
1782-
"Object#tainted? is deprecated and will be removed in Ruby 3.2.");
1783-
}
1784-
return false;
1785-
}
1786-
1787-
}
1788-
1789-
@CoreMethod(names = "untrusted?")
1790-
public abstract static class KernelIsUntrustedNode extends CoreMethodArrayArgumentsNode {
1791-
1792-
@Specialization
1793-
protected boolean isUntrusted(Object object,
1794-
@Cached("new()") WarningNode warningNode) {
1795-
if (warningNode.shouldWarn()) {
1796-
warningNode.warningMessage(
1797-
getSourceSection(),
1798-
"Object#untrusted? is deprecated and will be removed in Ruby 3.2.");
1799-
}
1800-
return false;
1801-
}
1802-
1803-
}
1804-
18051740
@Primitive(name = "kernel_to_hex")
18061741
public abstract static class KernelToHexStringNode extends PrimitiveArrayArgumentsNode {
18071742

@@ -1898,38 +1833,6 @@ public static String uncachedBasicToS(RubyDynamicObject self) {
18981833
}
18991834
}
19001835

1901-
@CoreMethod(names = "untaint")
1902-
public abstract static class UntaintNode extends CoreMethodArrayArgumentsNode {
1903-
1904-
@Specialization
1905-
protected Object untaint(Object object,
1906-
@Cached("new()") WarningNode warningNode) {
1907-
if (warningNode.shouldWarn()) {
1908-
warningNode.warningMessage(
1909-
getSourceSection(),
1910-
"Object#untaint is deprecated and will be removed in Ruby 3.2.");
1911-
}
1912-
return object;
1913-
}
1914-
1915-
}
1916-
1917-
@CoreMethod(names = "untrust")
1918-
public abstract static class UntrustNode extends CoreMethodArrayArgumentsNode {
1919-
1920-
@Specialization
1921-
protected Object untrust(Object object,
1922-
@Cached("new()") WarningNode warningNode) {
1923-
if (warningNode.shouldWarn()) {
1924-
warningNode.warningMessage(
1925-
getSourceSection(),
1926-
"Object#untrust is deprecated and will be removed in Ruby 3.2.");
1927-
}
1928-
return object;
1929-
}
1930-
1931-
}
1932-
19331836
@Primitive(name = "warning_get_category")
19341837
public abstract static class WarningGetCategoryNode extends PrimitiveArrayArgumentsNode {
19351838

0 commit comments

Comments
 (0)