Ruby Money
Represent money as integer minor units and perform same-currency arithmetic.
RubyMoney · Data tools
GitHub projectOpen source Open on GitHubHow to try it
With Ruby 3.2 available, install money at version 7.1.1. Add two synthetic USD amounts of 125 and 275 cents.
What we tested
7.1.1. Add two synthetic USD amounts of 125 and 275 cents. The sum held 400 cents and retained the USD currency.