Project

General

Profile

Actions

Feature #22611

open

Deprecate String#crypt

Feature #22611: Deprecate String#crypt

Added by jeremyevans0 (Jeremy Evans) about 7 hours ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:127640]

Description

@matz (Yukihiro Matsumoto) agreed to deprecate String#crypt in #14915. This ticket proposes a deprecation and removal plan.

Recommended Approach:

Ruby 4.1: Change String#crypt to warn in both verbose and non-verbose mode if called, and raise NotImplementedError when crypt(3) is not available.
Ruby 4.2: Remove String#crypt.

Alternate Approach:

Ruby 4.1: Change String#crypt to warn in verbose mode if called, and raise NotImplementedError when crypt(3) is not available.
Ruby 4.2: Change String#crypt to warn in both verbose and non-verbose mode if called.
Ruby 4.3: Remove String#crypt.

While my recommended approach may seem aggresive, it's trivial to work around the issue by installing the string-crypt gem and requiring string/crypt. I had previous archived the string-crypt repository in 2022 as it didn't look like String#crypt would be removed. I have unarchived it, and will be updating it to fix build issues and raise NotImplementedError when crypt(3) is not available. I'd be happy to transfer the repository to the ruby organization and update the gem owners appropriately, if that is desired. If not desired, I'm willing to maintain it going forward similarly to the other gems I maintain, updating it to support future Ruby releases.

I will work on a PR for the recommended approach, which can be easily changed to the alternate approach if that is desired. I'll post a comment with the PR when it is ready, hopefully by this weekend.

No data to display

Actions

Also available in: PDF Atom