Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 1174cc5

Browse files
authored
Merge pull request #2684 from bjfish/ignore-safe-when-not-mri
Only set $SAFE for MRI in spec helper
2 parents 7c2531e + f357247 commit 1174cc5

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)