Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubocop/rubocop-performance
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.20.2
Choose a base ref
...
head repository: rubocop/rubocop-performance
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.21.0
Choose a head ref
  • 16 commits
  • 33 files changed
  • 2 contributors

Commits on Jan 8, 2024

  1. Configuration menu
    Copy the full SHA
    3ba5d91 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. [Fix #437] Fix a false positive for Performance/ChainArrayAllocation

    Fixes #437.
    
    This PR fixes a false positive for `Performance/ChainArrayAllocation`
    when using `select` with block argument after `select`.
    koic committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    2103446 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. Merge pull request #439 from koic/fix_a_false_positive_for_performanc…

    …e_chain_array_allocation
    
    [Fix #437] Fix a false positive for `Performance/ChainArrayAllocation`
    koic authored Feb 3, 2024
    Configuration menu
    Copy the full SHA
    c07dcd2 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    4230dc0 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. Configuration menu
    Copy the full SHA
    ae0a3d4 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Remove redundant expect_no_offenses keyword arguments

    This PR removes the following redundant `expect_no_offenses` keyword arguments:
    
    ```console
    $ bundle exec rubocop
    (snip)
    
    Offenses:
    
    spec/rubocop/cop/performance/redundant_equality_comparison_block_spec.rb:52:35:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
            expect_no_offenses(<<~RUBY, method_name: method_name)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    spec/rubocop/cop/performance/sum_spec.rb:329:33:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
          expect_no_offenses(<<~RUBY, method: method)
                                    ^^^^^^^^^^^^^^^^
    spec/rubocop/cop/performance/sum_spec.rb:348:35:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
            expect_no_offenses(<<~RUBY, method: method)
                                      ^^^^^^^^^^^^^^^^
    spec/rubocop/cop/performance/times_map_spec.rb:52:37:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
              expect_no_offenses(<<~RUBY, method: method)
                                        ^^^^^^^^^^^^^^^^
    spec/rubocop/cop/performance/times_map_spec.rb:60:37:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
              expect_no_offenses(<<~RUBY, method: method)
                                        ^^^^^^^^^^^^^^^^
    spec/rubocop/cop/performance/times_map_spec.rb:68:37:
    C: [Correctable] InternalAffairs/RedundantExpectOffenseArguments: Remove the redundant arguments.
              expect_no_offenses(<<~RUBY, method: method)
                                        ^^^^^^^^^^^^^^^^
    
    118 files inspected, 6 offenses detected, 6 offenses autocorrectable
    ```
    koic committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    dd698b2 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. [Fix #240] Disable Performance/Casecmp cop

    This cop suggests an incorrect fix when code involves non-ASCII
    characters. Disabling it by default makes this risky behavior opt-in
    rather than opt-out.
    parkerfinch authored and koic committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    4dc1e5c View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Merge pull request #443 from koic/disalbe_performance_casecmp_by_default

    [Fix #240] Disable `Performance/Casecmp` cop
    koic authored Feb 17, 2024
    Configuration menu
    Copy the full SHA
    08ac312 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Use RuboCop RSpec 2.27

    koic committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    9ba15dd View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Tweak specs for Performance/UnfreezeString

    Follow up #418.
    koic committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    13aa3d1 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Support Prism as a Ruby parser

    Follow up rubocop/rubocop-ast#277
    
    In Prism (`Prism::Translation::Parser`), `match-with-lvasgn` can be distinctly differentiated.
    
    It is unclear whether to conform to the current behavior of the Parser gem, but initially,
    `def_node_matcher` has been updated to accept the following incompatibilities for
    `Performance/EndWith`, `Performance/StringInclude`, and `Performance/StartWith` cops
    to ensure it works with Prism 0.24.0 as well.
    
    ## Parser gem
    
    Returns an `match_with_lvasgn` node:
    
    ```console
    $ bundle exec ruby -rparser/ruby33 -ve 'p Parser::Ruby33.parse("/foo/ =~ bar")'
    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
    s(:match_with_lvasgn,
      s(:regexp,
        s(:str, "foo"),
        s(:regopt)),
      s(:send, nil, :bar))
    ```
    
    Returns an `match_with_lvasgn` node:
    
    ```console
    $ bundle exec ruby -rparser/ruby33 -ve 'p Parser::Ruby33.parse("/(?<foo>)foo/ =~ bar")'
    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
    s(:match_with_lvasgn,
      s(:regexp,
        s(:str, "(?<foo>)foo"),
        s(:regopt)),
      s(:send, nil, :bar))
    ```
    
    This lvar-injecting feature appears to have not been supported by Parser gem for a long time:
    whitequark/parser#69 (comment)
    
    ## Prism
    
    Returns an `send` node:
    
    ```console
    $ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("/foo/ =~ bar")'
    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
    s(:send,
      s(:regexp,
        s(:str, "foo"),
        s(:regopt)), :=~,
      s(:send, nil, :bar))
    ```
    
    Returns an `match_with_lvasgn` node:
    
    ```console
    $ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("/(?<foo>)foo/ =~ bar")'
    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
    s(:match_with_lvasgn,
      s(:regexp,
        s(:str, "(?<foo>)foo"),
        s(:regopt)),
      s(:send, nil, :bar))
    ```
    koic committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    2059d28 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #446 from koic/support_prism

    Support Prism as a Ruby parser
    koic authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    d4d1875 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. [Fix #448] Fix a false positive for Performance/RedundantBlockCall

    Fixes #448.
    
    This PR fixes a false positive for `Performance/RedundantBlockCall`
    when using `block.call` with block argument.
    koic committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    0d98285 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. Merge pull request #449 from koic/fix_false_positive_for_performance_…

    …redundant_block_call
    
    [Fix #448] Fix a false positive for `Performance/RedundantBlockCall`
    koic authored Mar 29, 2024
    Configuration menu
    Copy the full SHA
    9d28120 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2024

  1. Update Changelog

    koic committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    067c641 View commit details
    Browse the repository at this point in the history
  2. Cut 1.21.0

    koic committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    30f6669 View commit details
    Browse the repository at this point in the history
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy