diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-11-14 18:54:13 -0800 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-11-18 01:00:25 +0200 |
commit | ab42e5a486a5b27107296fa34056f03ac878e306 (patch) | |
tree | bead27022495820d026620df9a63c3969946b805 /test/bigdecimal/test_bigdecimal.rb | |
parent | ffd0820ab317542f8780aac475da590a4bdbc7a8 (diff) |
More fixes for $SAFE/taint post merging
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2476
Diffstat (limited to 'test/bigdecimal/test_bigdecimal.rb')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 16 |
1 files changed, 9 insertions, 7 deletions
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 |