Skip to content

Pass opts through to parse from Decimal.new/2#227

Merged
ericmj merged 3 commits into
ericmj:mainfrom
bkilshaw:new-opts
May 7, 2026
Merged

Pass opts through to parse from Decimal.new/2#227
ericmj merged 3 commits into
ericmj:mainfrom
bkilshaw:new-opts

Conversation

@bkilshaw
Copy link
Copy Markdown
Contributor

@bkilshaw bkilshaw commented May 7, 2026

The 3.0 release introduced passing opts to Decimal.parse but Decimal.new/1 didn't expose it, so callers had no way to use those options when constructing a Decimal from a string via new.

This adds an optional opts argument to Decimal.new, forwarding it to parse/2.

@ericmj
Copy link
Copy Markdown
Owner

ericmj commented May 7, 2026

Thanks for the PR! Can you add a test for this also?

@ericmj ericmj merged commit 3e9db1a into ericmj:main May 7, 2026
2 checks passed
@bkilshaw bkilshaw mentioned this pull request May 8, 2026
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.

2 participants