Skip to content

Extract float formatting into a static method to use with to_json#9200

Merged
headius merged 1 commit intojruby:masterfrom
evaniainbrooks:float-formatter
Jan 30, 2026
Merged

Extract float formatting into a static method to use with to_json#9200
headius merged 1 commit intojruby:masterfrom
evaniainbrooks:float-formatter

Conversation

@evaniainbrooks
Copy link
Contributor

@headius headius marked this pull request as ready for review January 29, 2026 23:43
@headius
Copy link
Member

headius commented Jan 29, 2026

@evaniainbrooks This is great, thank you!

The spec should probably go in spec/ruby if that behavior is not already in specs, and we'll probably want to backport this to 9.4 so the json gem doesn't break for future versions, but this could probably go into 10.0.3.0 to get the json work moving forward.

Requesting review from @enebo.

@headius headius requested a review from enebo January 29, 2026 23:46
@headius headius added this to the JRuby 10.0.3.0 milestone Jan 29, 2026
@evaniainbrooks
Copy link
Contributor Author

I reverted the added spec because this is certainly already covered in spec/ruby/core/float/shared/to_s.rb

Copy link
Member

@headius headius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I will backport to 9.4 since we will need the json gem to keep working there once it starts using this API.

@headius headius merged commit ea1ea89 into jruby:master Jan 30, 2026
75 of 76 checks passed
@headius
Copy link
Member

headius commented Jan 30, 2026

@evaniainbrooks Thank you! Let me know if I can do anything else to help.

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.

2 participants