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

Fix JSON::GeneratorError#detailed_message with Ruby < 3.2 #757

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

rahim
Copy link
Contributor

@rahim rahim commented Mar 5, 2025

Fixes #758

Exception#detailed_message didn't exist until Ruby 3.2. https://bugs.ruby-lang.org/journals/96316/diff?detail_id=61977

#712 added JSON::GeneratorError which defines #detailed_message expecting to delegate to super. For affected rubies this leads to NoMethodError if invoked, eg as happens here in sinatra.

@byroot byroot merged commit ac30b69 into ruby:master Mar 5, 2025
33 checks passed
@byroot
Copy link
Member

byroot commented Mar 5, 2025

Thank you!

@rahim rahim deleted the fix-generator-error-no-method-error branch March 5, 2025 21:51
@rahim
Copy link
Contributor Author

rahim commented Mar 6, 2025

Thanks for the quick merge! 😄

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.

JSON::GeneratorError#detailed_message raises NoMethodError with Ruby < 3.2
2 participants