diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 853ebc8d9..eda55d29f 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -496,13 +496,15 @@ def test_clone_and_dup assert_equal ["a", "b", "c"], d end - def test_dup_and_clone_replicate_taint - a = FileList["a", "b", "c"] - a.taint - c = a.clone - d = a.dup - assert c.tainted?, "Clone should be tainted" - assert d.tainted?, "Dup should be tainted" + if RUBY_VERSION < '2.7' + def test_dup_and_clone_replicate_taint + a = FileList["a", "b", "c"] + a.taint + c = a.clone + d = a.dup + assert c.tainted?, "Clone should be tainted" + assert d.tainted?, "Dup should be tainted" + end end def test_duped_items_will_thaw