Skip to content

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

Merged
byroot merged 1 commit intoruby:masterfrom
rahim:fix-generator-error-no-method-error
Mar 5, 2025
Merged

Fix JSON::GeneratorError#detailed_message with Ruby < 3.2#757
byroot merged 1 commit intoruby:masterfrom
rahim:fix-generator-error-no-method-error

Conversation

@rahim
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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