Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate SecurityError #7193

Closed
wants to merge 1 commit into from

Conversation

jeremyevans
Copy link
Contributor

This probably should have been removed when $SAFE was removed, but there are a few places where it was still used.

Deprecate Ruby-level reference to SecurityError using the standard rb_deprecate_constant. Deprecate C-level reference to rb_eSecurityError by renaming to rb__eSecurityError, and adding a rb_eSecurityError macro that warns on GCC and clang (not sure if the approach used will work on other compilers).

Remove dead code referencing rb_eSecurityError in rb_reg_initialize, since all literal regexps are now frozen.

The only code inside Ruby that was actually using SecurityError was the setuid/setgid checks will processing command line options. Since these exceptions could not be rescued in normal use, switch to RuntimeError, since doing so shouldn't break backwards compatibility.

Fix fallout in specs.

Add note to remove SecurityError in Ruby 3.4.

This probably should have been removed when $SAFE was removed, but
there are a few places where it was still used.

Deprecate Ruby-level reference to SecurityError using the standard
rb_deprecate_constant.  Deprecate C-level reference to
rb_eSecurityError by renaming to rb__eSecurityError, and adding a
rb_eSecurityError macro that warns on GCC and clang (not sure if
the approach used will work on other compilers).

Remove dead code referencing rb_eSecurityError in rb_reg_initialize,
since all literal regexps are now frozen.

The only code inside Ruby that was actually using SecurityError
was the setuid/setgid checks will processing command line options.
Since these exceptions could not be rescued in normal use, switch
to RuntimeError, since doing so shouldn't break backwards
compatibility.

Fix fallout in specs.

Add note to remove SecurityError in Ruby 3.4.
@jeremyevans jeremyevans closed this Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant