You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
Apologies for the mess: I'd hoped to sneak in the fix under the radar, but you were too quick for me :p
The issue with Arel is that when constructing SQL to store BigDecimals, it calls BigDecimal#to_s("F"). I had tweaked #to_s to accept a format argument without thinking to check what the format argument was. I had just assumed it would accept an sprintf-compatible format string, but in fact it's a special format code (hence "F"). As a result, my #to_s implementation, called from Arel, would convert every BigDecimal to the string "F", which the database simply rejects as badly-formatted SQL.
The new implementation uses the format string if supplied with #to_s, and if no parameter was supplied it falls back to an sprintf-based formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I broke things (Arel, in particular) with the implementation of #to_s I committed :( This fixes it all up.