Skip to content

Fix up did_you_mean usage #97

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

Merged
merged 1 commit into from
Jun 10, 2022
Merged

Fix up did_you_mean usage #97

merged 1 commit into from
Jun 10, 2022

Conversation

kddnewton
Copy link
Member

@kddnewton kddnewton commented Jun 10, 2022

did_you_mean now checks Exception.method_defined?(:detailed_message) to determine which method to override per ruby/did_you_mean@62799d7. This breaks our tests because previously we were checking error.message to assert that the error had been corrected, but now we need to check error.detailed_message. We need to switch here in the same way they do to support older versions of did_you_mean as well.

This PR also handles the case where --disable-did_you_mean was supplied on the command line by checking if the DidYouMean constant is defined.

@kddnewton kddnewton merged commit 9ad1cdd into main Jun 10, 2022
@kddnewton kddnewton deleted the did-you-mean branch June 10, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant