Skip to content

Commit 4c6cb8c

Browse files
authored
Merge pull request rspec#2684 from bjfish/ignore-safe-when-not-mri
Only set $SAFE for MRI in spec helper
2 parents f151e01 + 2b3a71d commit 4c6cb8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/support/helper_methods.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def ignoring_warnings
1515
end
1616

1717
# In Ruby 2.7 taint was removed and has no effect, whilst SAFE warns that it
18-
# has no effect and will become a normal varible in 3.0.
19-
if RUBY_VERSION >= '2.7'
18+
# has no effect and will become a normal varible in 3.0. Other engines do not
19+
# implement SAFE.
20+
if RUBY_VERSION >= '2.7' || (defined?(RUBY_ENGINE) && RUBY_ENGINE != "ruby")
2021
def with_safe_set_to_level_that_triggers_security_errors
2122
yield
2223
end

0 commit comments

Comments
 (0)