Skip to content

Improve handling multiple delimiters in input #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbulat
Copy link

@sbulat sbulat commented Jun 4, 2025

In the recent update, bigdecimal now parses 1. inputs as 1, instead of throwing an exception (ruby/bigdecimal#302). With the change, monetize parses inputs like 2..30 as 2 now, but previously it would throw an exception, passed down from BigDecimal.
The spec is already in place: spec/monetize_spec.rb:406, but it won't fail until Ruby 3.4.0

This PR updates the code to preserve the behavior with the newest version of BigDecimal.

Additionally, from Ruby 3.4, BigDecimal is no longer part of the standard library, so this PR updates the Gemfile accordingly.

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.

1 participant