From f3572472c03393ff1b0522ea956ba1ae4a68db03 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Tue, 7 Jan 2020 13:07:20 -0600 Subject: [PATCH] Only set $SAFE for MRI in spec helper --- spec/support/helper_methods.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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