Skip to content
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

I would expect BigDecimal#divmod to return type [Int, BigDecimal] (like Integer#divmod, Float#divmod) #262

Open
michaelglass opened this issue May 17, 2023 · 0 comments

Comments

@michaelglass
Copy link

Integer#divmod returns type [Integer, Integer]
Float#divmod returns type [Integer, Float]
BigDecimal#divmod returns type [BigDecimal, BigDecimal]

Which feels surprising.

1.divmod(2)
=> [0, 1]
(1.0).divmod(2)
=> [0, 1.0]
BigDecimal(1).divmod(2)
=> [0.0, 0.1e1]

(thank you BigDecimal maintainers, you are wonderful)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant