From ab42e5a486a5b27107296fa34056f03ac878e306 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 14 Nov 2019 18:54:13 -0800 Subject: More fixes for $SAFE/taint post merging --- test/bigdecimal/test_bigdecimal.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'test/bigdecimal/test_bigdecimal.rb') diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index f6ef88e3f5..0e76081431 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -155,13 +155,15 @@ class TestBigDecimal < Test::Unit::TestCase end end - def test_BigDecimal_with_tainted_string - Thread.new { - $SAFE = 1 - BigDecimal('1'.taint) - }.join - ensure - $SAFE = 0 + if RUBY_VERSION < '2.7' + def test_BigDecimal_with_tainted_string + Thread.new { + $SAFE = 1 + BigDecimal('1'.taint) + }.join + ensure + $SAFE = 0 + end end def test_BigDecimal_with_exception_keyword -- cgit v1.2.3