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

[Fix #454] Fix false positives for Performance/BigDecimalWithNumericArgument #463

Commits on Sep 6, 2024

  1. [Fix rubocop#454] Fix false positives for `Performance/BigDecimalWith…

    …NumericArgument`
    
    Fixes rubocop#454.
    
    This PR fixes false positives for `Performance/BigDecimalWithNumericArgument` when using BigDecimal 3.1+.
    
    The bad and good examples for this cop are reversed between BigDecimal 3.0 and 3.1.
    
    Since BigDecimal 3.1 is the default gem in Ruby 3.1, this PR reverses the bad and good examples when targeting Ruby 3.1+.
    So, the goal of this PR is to address many cases where the meaning was entirely reversed.
    
    To avoid introducing excessive complexity related to version dependencies, detection is disabled for Ruby 3.0 and below.
    
    Ideally, a solution that prioritizes the BigDecimal version would be best in the future, but this PR does not take that into account.
    koic committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    6f20945 View commit details
    Browse the repository at this point in the history