Skip to content

Conversation

@sunny
Copy link
Owner

@sunny sunny commented Jul 25, 2025

  • require version file
  • freeze version string
  • add spec for Money::VERSION (red without changes)
  • add Felix Wolfsteller as AUTHOR
  • add changelog entry about Money::VERSION
  • Fix HTTP links
  • Add ZWG
  • Updated Armenian Dram sign and HTML entity.
  • Updated the Turkmen Manat symbol and HTML entity
  • FIx doc comment error in formatter.rb
  • Improve Serbian Dinar formatting
  • Add method for cents-based check
  • Move .with_rounding_mode mode specs to it's own block
  • Refactor .rounding_mode deprecated method spec
  • Add failing spec for the .with_rounding_mode blocks nesting
  • Allow .with_rounding_mode blocks nesting
  • Test concurrency for the .with_rounding_mode block
  • Update changelog with nested rounding mode nesting feature mention
  • Update authors according to the Contribution Guidelines notes
  • Update changelog
  • Better explanation in changelog entry
  • Add changelog entry
  • Specify that true will return if condition is met
  • Update spec description
  • Add cents_based? to changelog
  • Add CHF change to changelog
  • Add cents_based? example
  • Remove space
  • Align return comments
  • remove maintainers wanted notice
  • Remove redundant encoding
  • Bump Ruby I18n requirement
  • Fix some typos
  • update CHANGELOG
  • fix test after merging AMD and TMT currency changes 😳
  • update CHANGELOG
  • test against Ruby 3.4
  • fix test to make it run in Ruby 3.4
  • Allow nil to be used as a default_currency
  • Enable Frozen string literals
  • Remove Code Climate
  • Improve specs and add code coverage
  • Test against JRuby 10.0
  • remove deprecated Money.infinite_precision method
  • Add with bank + tests
  • Mention with_bank ability
  • Improve tests
  • Add Money#to_nearest_cash_value to return a rounded Money instance to the smallest denomination
  • Remove special handling for Japanese language only
  • add Changelog comment.
  • Fix O(n2) to be O(n)
  • stop setting USD as default currency
  • tweak changelog recommendation
  • set default_currency before every test and simplify tests
  • remove deprecations related with rounding mode
  • fix comment
  • typo
  • use another rounding method in the README example
  • Added docs to rbs
  • Fix param type
  • Add RBS
  • Deprecate round_to_nearest_cash_value
  • BigDecimal doc link fixup
  • README 💅
  • remove Money#currency_as_string and Money#currency_as_string= deprecated methods
  • Specs: Remove spec for Money#pence which doesn’t exist

fwolfst and others added 30 commits June 20, 2024 10:08
With the help of [awesome_bot](https://github.com/dkhamsing/awesome_bot)

- Use https where possible
- Update Code Climate badge code
- Update broken links
- Replace `master` with `main`
Zimbabwe Gold is the official currency of Zimbabwe as of April 8 2024. This PR adds support for the new currency https://en.wikipedia.org/wiki/Zimbabwean_ZiG
The example for the documentation of the `:html_wrap_symbol` option showed the Ruby code from the previous option, `:disambiguate`, with the correct resulting string. Fixed to show the correct option being used in the example.
so that it can emphasize it's behaviour better
So that it won't return to the global value in case if someone will
modify down in the stack.

For example we might have:
```ruby
	- initializers/money.rb
	Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN

	- controllers/test.rb
	Money.with_rounding_mode(BigDecimal::ROUND_UP) do
	  object.amount = Money.from_amount(1.234)
	  object.save
	  other_object.amount = object.amount * different_rate
	end

	- models/object.rb
	def save
	  Money.with_rounding_mode(BigDecimal::ROUND_DOWN) do
	    self.tax = object.amount * tax_rate
	  end
	  ...
	end
```

Above example prior the change would cause other_object to use
`ROUND_HALF_EVEN`, despite it's explicitly defined in a `with_rounding_mode`
block which sets `ROUND_UP`.

The small rounding errors might be tricky to debug,
and in worst case scenarios can cumulate to a bigger differences when
code operates on multiple amounts that might be incorrectly rounded.

Co-Authored-By: Łukasz Wójcik <[email protected]>
Pranav Babu and others added 29 commits July 16, 2025 13:34
…to the smallest denomination

This new method allows you to get a new Money instance rounded to the smallest denomination.

Closes RubyMoney#1131
Remove special handling for Japanese language only
…recision-deprecation

remove deprecated Money.infinite_precision method
…ult-currency

stop setting USD as default currency
Co-authored-by: Sunny Ripert <[email protected]>
remove deprecations related with rounding mode
Fix O(n2) to be O(n) for generate method
Add Money.with_bank for Dynamic Currency Stores
Add `Money#to_nearest_cash_value` to return a rounded Money instance to the smallest denomination
…g-deprecation

remove Money#currency_as_string and Money#currency_as_string= deprecated methods
@sunny sunny closed this Jul 25, 2025
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.