Skip to content
New issue

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

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

Already on GitHub? # to your account

Don't autocorrect BigDecimal with float when precision is specified #150

Merged
merged 1 commit into from
Jul 11, 2020

Commits on Jul 11, 2020

  1. Don't autocorrect BigDecimal with float when precision is specified

    The precision argument to `BigDecimal()` is ignored unless the value is
    a float or rational. Converting the value from a float to a string when
    a precision is specified changes the result.
    
        $ ruby -rbigdecimal -e "puts BigDecimal(3.14, 1)"
        0.3e1
    
        $ ruby -rbigdecimal -e "puts BigDecimal('3.14', 1)"
        0.314e1
    eugeneius committed Jul 11, 2020
    Configuration menu
    Copy the full SHA
    80bbdab View commit details
    Browse the repository at this point in the history