aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 1f21619798..84fa99c2bc 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2749,10 +2749,15 @@ CODE
assert_not_equal(str.object_id, (+str).object_id)
assert_equal(str.object_id, (-str).object_id)
+
+ return unless @cls == String
bar = %w(b a r).join('')
assert_not_predicate bar, :tainted?
assert_not_predicate str, :tainted?
assert_same(str, -bar, "uminus deduplicates [Feature #13077]")
+ bar = %w(b a r).taint.join('')
+ tstr = str.dup.taint
+ assert_same -tstr, -bar
end
def test_ord