Skip to content

Conversation

@deivid-rodriguez
Copy link
Contributor

What was the end-user or developer problem that led to this PR?

Since Ruby 3.4.5, which ships with did_you_mean-2.0.0, RubyGems no longer gives "did you mean" suggestions for unknown commands.

This is because did_you_mean-2.0.0 completely removed the SPELL_CHECKERS constant, and attaching "did you mean" to Gem::UnknownCommandError errors required this constant to be defined.

What is your fix for the problem, implemented in this PR?

The fix is to remove conditions on the SPELL_CHECKERS constant.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-did-you-mean-suggestions branch from 3d8a173 to 333fe0c Compare September 2, 2025 05:11
Since Ruby 3.4.5, which ships with did_you_mean-2.0.0, RubyGems no
longer gives "did you mean" suggestions for unknown commands.

This is because did_you_mean-2.0.0 completely removed the SPELL_CHECKERS
constant, and attaching "did you mean" to `Gem::UnknownCommandError`
errors required this constant to be defined.

The fix is to remove conditions on the `SPELL_CHECKERS` constant.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-did-you-mean-suggestions branch from 333fe0c to 9287cd8 Compare September 2, 2025 05:14
@deivid-rodriguez deivid-rodriguez merged commit e0d470b into master Sep 3, 2025
73 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/fix-did-you-mean-suggestions branch September 3, 2025 17:18
deivid-rodriguez added a commit that referenced this pull request Sep 4, 2025
…ean-suggestions

Fix "did you mean" suggestions for unknown commands

(cherry picked from commit e0d470b)
k0kubun added a commit to ruby/ruby that referenced this pull request Sep 5, 2025
This fails way too often these days, probably since
ruby/rubygems#8948.

To make sure we can merge ruby/ruby PRs, we need this to not fail
randomly.
deivid-rodriguez added a commit that referenced this pull request Sep 9, 2025
…ean-suggestions

Fix "did you mean" suggestions for unknown commands

(cherry picked from commit e0d470b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants