diff --git a/spec/support/helper_methods.rb b/spec/support/helper_methods.rb index 1ed3d7934c..c4a7027b85 100644 --- a/spec/support/helper_methods.rb +++ b/spec/support/helper_methods.rb @@ -15,8 +15,9 @@ def ignoring_warnings end # In Ruby 2.7 taint was removed and has no effect, whilst SAFE warns that it - # has no effect and will become a normal varible in 3.0. - if RUBY_VERSION >= '2.7' + # has no effect and will become a normal varible in 3.0. Other engines do not + # implement SAFE. + if RUBY_VERSION >= '2.7' || (defined?(RUBY_ENGINE) && RUBY_ENGINE != "ruby") def with_safe_set_to_level_that_triggers_security_errors yield end