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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.0.3 - 2026-04-26
Fixed
Rational scalars and rates are now accepted everywhere they are documented to
work: Amount#*, Amount#/, Amount#to(rate:), Amount.register_default_rate,
and display_units[unit][:scale]. Previously each of these called BigDecimal(value.to_s), which raises ArgumentError for Rational#to_s
("3/2"). All five sites now go through a single internal helper, Amount.coerce_decimal, that handles BigDecimal, Rational, and string-or-
numeric inputs uniformly.
Amount.load wraps a missing :atomic or :symbol key as Amount::InvalidInput ("amount payload missing key: atomic") instead of
leaking a raw KeyError. This matches the AR adapter's Type#cast_hash
behavior so callers can rescue a single error class.