diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 6665cce0a2..1a4accc27c 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -123,7 +123,7 @@ GEM unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.7.0) parser (>= 3.0.1.1) - rubocop-performance (1.11.3) + rubocop-performance (1.11.4) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rails (2.11.2) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.3.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi similarity index 89% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.3.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi index 3a1d706cd2..db7a7156af 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi @@ -4,18 +4,13 @@ # typed: true -module RuboCop -end - -module RuboCop::Cop -end - -module RuboCop::Cop::Performance -end +module RuboCop; end +module RuboCop::Cop; end +module RuboCop::Cop::Performance; end class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def ancestors_include_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -26,13 +21,12 @@ class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def endless_range?(param0 = T.unsafe(nil)); end def endless_range_slice?(param0 = T.unsafe(nil)); end @@ -44,13 +38,11 @@ class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::B end RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -61,13 +53,12 @@ class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop: end RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def bind_with_call_method?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -80,22 +71,20 @@ class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end end RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def caller_with_scope_method?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -107,13 +96,12 @@ class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base - include(::RuboCop::Cop::Alignment) - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_case(case_node); end @@ -135,11 +123,10 @@ class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def downcase_downcase(param0 = T.unsafe(nil)); end def downcase_eq(param0 = T.unsafe(nil)); end @@ -154,28 +141,21 @@ class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RangeHelp def chain_array_allocation?(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set) class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base @@ -197,24 +177,17 @@ class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def compare?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -230,7 +203,7 @@ end RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_regexp(node); end def regexp_escape?(param0 = T.unsafe(nil)); end @@ -244,8 +217,8 @@ end RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def count_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -258,41 +231,36 @@ class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RegexpMetacharacter) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def delete_prefix_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RegexpMetacharacter) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def delete_suffix_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def detect_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -309,19 +277,14 @@ class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) - RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def check_with_active_support_aliases(param0 = T.unsafe(nil)); end def on_or(node); end @@ -339,8 +302,8 @@ end RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RegexpMetacharacter) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector def on_match_with_lvasgn(node); end def on_send(node); end @@ -348,7 +311,6 @@ class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base @@ -366,12 +328,11 @@ class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def flat_map_candidate?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -385,13 +346,11 @@ class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def inefficient_include?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -409,8 +368,8 @@ end RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def readlines_on_class?(param0 = T.unsafe(nil)); end @@ -427,25 +386,23 @@ class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def map_compact(param0 = T.unsafe(nil)); end def on_send(node); end private - def compact_method_range(compact_node); end def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end + def remove_compact_method(corrector, compact_node); end end RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base @@ -461,22 +418,20 @@ class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def range_include(param0 = T.unsafe(nil)); end end RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def blockarg_assigned?(param0, param1); end def blockarg_calls(param0, param1); end @@ -492,18 +447,14 @@ class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) - extend(::RuboCop::Cop::TargetRubyVersion) + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion def on_block(node); end @@ -517,15 +468,12 @@ class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::C end RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def match_call?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -537,11 +485,10 @@ class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def modifier_flow_control?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -567,7 +514,7 @@ end RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def initialize(node, receiver); end @@ -584,15 +531,13 @@ class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector end RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::SortBlock) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -604,7 +549,7 @@ end RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def split_call_with_regexp?(param0 = T.unsafe(nil)); end @@ -616,16 +561,13 @@ class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop:: end RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def redundant_chars_call?(param0 = T.unsafe(nil)); end @@ -641,11 +583,10 @@ class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def last_matches(param0); end def match_method?(param0 = T.unsafe(nil)); end @@ -678,14 +619,12 @@ class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def reverse_each?(param0 = T.unsafe(nil)); end @@ -697,12 +636,11 @@ class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def reverse_first_candidate?(param0 = T.unsafe(nil)); end @@ -716,12 +654,11 @@ class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::TargetRubyVersion) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion def bad_method?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -733,11 +670,10 @@ class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def array?(param0 = T.unsafe(nil)); end def count?(param0 = T.unsafe(nil)); end @@ -746,13 +682,12 @@ class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::SortBlock) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -764,7 +699,7 @@ end RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def squeeze_candidate?(param0 = T.unsafe(nil)); end @@ -775,14 +710,12 @@ class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RegexpMetacharacter) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector def on_match_with_lvasgn(node); end def on_send(node); end @@ -790,11 +723,10 @@ class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_match_with_lvasgn(node); end def on_send(node); end @@ -806,12 +738,11 @@ class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def string_replacement?(param0 = T.unsafe(nil)); end @@ -834,20 +765,15 @@ class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end @@ -878,13 +804,11 @@ class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def on_send(node); end @@ -897,13 +821,11 @@ class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def dup_string?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -915,22 +837,19 @@ class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base end RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def uri_parser_new?(param0 = T.unsafe(nil)); end end RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RegexpMetacharacter - private def drop_end_metacharacter(regexp_string); end @@ -945,8 +864,8 @@ module RuboCop::Cop::RegexpMetacharacter end module RuboCop::Cop::SortBlock - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end def sort_with_block?(param0 = T.unsafe(nil)); end @@ -957,11 +876,9 @@ module RuboCop::Cop::SortBlock end RuboCop::NodePattern = RuboCop::AST::NodePattern - -module RuboCop::Performance -end - +module RuboCop::Performance; end RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash) +RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) module RuboCop::Performance::Inject class << self @@ -969,6 +886,8 @@ module RuboCop::Performance::Inject end end +RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + module RuboCop::Performance::Version class << self def document_version; end @@ -976,7 +895,5 @@ module RuboCop::Performance::Version end RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String) - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - RuboCop::Token = RuboCop::AST::Token diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 144ba8a5f9..6ebf222115 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -82,7 +82,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.7.0/lib $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.17.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/config/default.yml similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/config/default.yml index e617662bd4..9decfdd4ac 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/config/default.yml @@ -96,14 +96,18 @@ Performance/Count: Performance/DeletePrefix: Description: 'Use `delete_prefix` instead of `gsub`.' Enabled: true + Safe: false SafeMultiline: true VersionAdded: '1.6' + VersionChanged: '1.11' Performance/DeleteSuffix: Description: 'Use `delete_suffix` instead of `gsub`.' Enabled: true + Safe: false SafeMultiline: true VersionAdded: '1.6' + VersionChanged: '1.11' Performance/Detect: Description: >- diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/config/obsoletion.yml similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/config/obsoletion.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/config/obsoletion.yml diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop-performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop-performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop-performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop-performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/mixin/regexp_metacharacter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/mixin/regexp_metacharacter.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/mixin/regexp_metacharacter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/mixin/regexp_metacharacter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/mixin/sort_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/mixin/sort_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/mixin/sort_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/mixin/sort_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/ancestors_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/ancestors_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/ancestors_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/ancestors_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb index bb0b39ee91..caef078b90 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb @@ -11,11 +11,11 @@ module RuboCop # # @example # # bad - # # array[..2] - # # array[...2] - # # array[2..] - # # array[2...] - # # array.slice(..2) + # array[..2] + # array[...2] + # array[2..] + # array[2...] + # array.slice(..2) # # # good # array.take(3) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/bind_call.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/bind_call.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/bind_call.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/bind_call.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/block_given_with_explicit_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/block_given_with_explicit_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/block_given_with_explicit_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/block_given_with_explicit_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/caller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/caller.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/caller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/caller.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/case_when_splat.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/case_when_splat.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/case_when_splat.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/case_when_splat.rb index 4aab7715e3..ceb1d5a185 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/case_when_splat.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/case_when_splat.rb @@ -58,10 +58,8 @@ module RuboCop include RangeHelp extend AutoCorrector - MSG = 'Reordering `when` conditions with a splat to the end ' \ - 'of the `when` branches can improve performance.' - ARRAY_MSG = 'Pass the contents of array literals ' \ - 'directly to `when` conditions.' + MSG = 'Reordering `when` conditions with a splat to the end of the `when` branches can improve performance.' + ARRAY_MSG = 'Pass the contents of array literals directly to `when` conditions.' def on_case(case_node) when_conditions = case_node.when_branches.flat_map(&:conditions) @@ -134,13 +132,11 @@ module RuboCop end def new_condition_with_then(node, new_condition) - "\n#{indent_for(node)}when " \ - "#{new_condition} then #{node.body.source}" + "\n#{indent_for(node)}when #{new_condition} then #{node.body.source}" end def new_branch_without_then(node, new_condition) - "\n#{indent_for(node)}when #{new_condition}" \ - "\n#{indent_for(node.body)}#{node.body.source}" + "\n#{indent_for(node)}when #{new_condition}\n#{indent_for(node.body)}#{node.body.source}" end def indent_for(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/casecmp.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/casecmp.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/casecmp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/casecmp.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/chain_array_allocation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/chain_array_allocation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/chain_array_allocation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/chain_array_allocation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/collection_literal_in_loop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/collection_literal_in_loop.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/collection_literal_in_loop.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/collection_literal_in_loop.rb index e0f9f0f08b..a9c5130ff3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/collection_literal_in_loop.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/collection_literal_in_loop.rb @@ -33,7 +33,7 @@ module RuboCop # class CollectionLiteralInLoop < Base MSG = 'Avoid immutable %s literals in loops. '\ - 'It is better to extract it into a local variable or a constant.' + 'It is better to extract it into a local variable or a constant.' POST_CONDITION_LOOP_TYPES = %i[while_post until_post].freeze LOOP_TYPES = (POST_CONDITION_LOOP_TYPES + %i[while until for]).freeze diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/compare_with_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/compare_with_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/compare_with_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/compare_with_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/constant_regexp.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/constant_regexp.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/constant_regexp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/constant_regexp.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/count.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/count.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/count.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/count.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_prefix.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_prefix.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_prefix.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_prefix.rb index f023ffbc20..998b7543af 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_prefix.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_prefix.rb @@ -7,6 +7,7 @@ module RuboCop # # This cop identifies places where `gsub(/\Aprefix/, '')` and `sub(/\Aprefix/, '')` # can be replaced by `delete_prefix('prefix')`. + # It is marked as unsafe by default because `Pathname` has `sub` but not `delete_prefix`. # # This cop has `SafeMultiline` configuration option that `true` by default because # `^prefix` is unsafe as it will behave incompatible with `delete_prefix` @@ -66,7 +67,7 @@ module RuboCop def on_send(node) return unless (receiver, bad_method, regexp_str, replace_string = delete_prefix_candidate?(node)) - return unless replace_string.blank? + return unless replace_string.empty? good_method = PREFERRED_METHODS[bad_method] diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_suffix.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_suffix.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_suffix.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_suffix.rb index d4251210bd..6559b44792 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/delete_suffix.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/delete_suffix.rb @@ -7,6 +7,7 @@ module RuboCop # # This cop identifies places where `gsub(/suffix\z/, '')` and `sub(/suffix\z/, '')` # can be replaced by `delete_suffix('suffix')`. + # It is marked as unsafe by default because `Pathname` has `sub` but not `delete_suffix`. # # This cop has `SafeMultiline` configuration option that `true` by default because # `suffix$` is unsafe as it will behave incompatible with `delete_suffix?` @@ -66,7 +67,7 @@ module RuboCop def on_send(node) return unless (receiver, bad_method, regexp_str, replace_string = delete_suffix_candidate?(node)) - return unless replace_string.blank? + return unless replace_string.empty? good_method = PREFERRED_METHODS[bad_method] diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/detect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/detect.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/detect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/detect.rb index f250ff64ae..fad524847b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/detect.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/detect.rb @@ -31,14 +31,10 @@ module RuboCop CANDIDATE_METHODS = Set[:select, :find_all, :filter].freeze - MSG = 'Use `%s` instead of ' \ - '`%s.%s`.' - REVERSE_MSG = 'Use `reverse.%s` instead of ' \ - '`%s.%s`.' - INDEX_MSG = 'Use `%s` instead of ' \ - '`%s[%i]`.' - INDEX_REVERSE_MSG = 'Use `reverse.%s` instead of ' \ - '`%s[%i]`.' + MSG = 'Use `%s` instead of `%s.%s`.' + REVERSE_MSG = 'Use `reverse.%s` instead of `%s.%s`.' + INDEX_MSG = 'Use `%s` instead of `%s[%i]`.' + INDEX_REVERSE_MSG = 'Use `reverse.%s` instead of `%s[%i]`.' RESTRICT_ON_SEND = %i[first last []].freeze def_node_matcher :detect_candidate?, <<~PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/double_start_end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/double_start_end_with.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/double_start_end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/double_start_end_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/end_with.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/end_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/fixed_size.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/fixed_size.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/fixed_size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/fixed_size.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/flat_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/flat_map.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/flat_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/flat_map.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/inefficient_hash_search.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/inefficient_hash_search.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/inefficient_hash_search.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/inefficient_hash_search.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/io_readlines.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/io_readlines.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/io_readlines.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/io_readlines.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/map_compact.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/map_compact.rb similarity index 87% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/map_compact.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/map_compact.rb index 8923ed5422..705c723da7 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/map_compact.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/map_compact.rb @@ -56,23 +56,24 @@ module RuboCop add_offense(range) do |corrector| corrector.replace(map_node.loc.selector, 'filter_map') - corrector.remove(compact_loc.dot) - corrector.remove(compact_method_range(node)) + remove_compact_method(corrector, node) end end private - def compact_method_range(compact_node) + def remove_compact_method(corrector, compact_node) chained_method = compact_node.parent compact_method_range = compact_node.loc.selector if compact_node.multiline? && chained_method&.loc.respond_to?(:selector) && !invoke_method_after_map_compact_on_same_line?(compact_node, chained_method) - range_by_whole_lines(compact_method_range, include_final_newline: true) + compact_method_range = range_by_whole_lines(compact_method_range, include_final_newline: true) else - compact_method_range + corrector.remove(compact_node.loc.dot) end + + corrector.remove(compact_method_range) end def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/method_object_as_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/method_object_as_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/method_object_as_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/method_object_as_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/open_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/open_struct.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/open_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/open_struct.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/range_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/range_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/range_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/range_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_block_call.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_block_call.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_block_call.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_block_call.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_match.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_match.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_merge.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_merge.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_merge.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_merge.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_sort_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_sort_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_sort_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_sort_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_string_chars.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_string_chars.rb similarity index 82% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_string_chars.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_string_chars.rb index 9d5eb625c6..20d9bc0c0c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/redundant_string_chars.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/redundant_string_chars.rb @@ -16,35 +16,35 @@ module RuboCop # # bad # str.chars.first # str.chars.first(2) - # str.chars.last - # str.chars.last(2) # # # good # str[0] # str[0...2].chars - # str[-1] - # str[-2..-1].chars # # # bad # str.chars.take(2) - # str.chars.drop(2) # str.chars.length # str.chars.size # str.chars.empty? # # # good # str[0...2].chars - # str[2..-1].chars # str.length # str.size # str.empty? # + # # For example, if the receiver is a blank string, it will be incompatible. + # # If a negative value is specified for the receiver, `nil` is returned. + # str.chars.last # Incompatible with `str[-1]`. + # str.chars.last(2) # Incompatible with `str[-2..-1].chars`. + # str.chars.drop(2) # Incompatible with `str[2..-1].chars`. + # class RedundantStringChars < Base include RangeHelp extend AutoCorrector MSG = 'Use `%s` instead of `%s`.' - RESTRICT_ON_SEND = %i[[] slice first last take drop length size empty?].freeze + RESTRICT_ON_SEND = %i[[] slice first take length size empty?].freeze def_node_matcher :redundant_chars_call?, <<~PATTERN (send $(send _ :chars) $_ $...) @@ -80,7 +80,6 @@ module RuboCop format(MSG, good_method: good_method, bad_method: bad_method) end - # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength def build_good_method(method, args) case method when :[], :slice @@ -91,21 +90,12 @@ module RuboCop else '[0]' end - when :last - if args.any? - "[-#{args.first.source}..-1].chars" - else - '[-1]' - end when :take "[0...#{args.first.source}].chars" - when :drop - "[#{args.first.source}..-1].chars" else ".#{method}" end end - # rubocop:enable Metrics/CyclomaticComplexity, Metrics/MethodLength def build_bad_method(method, args) case method diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/regexp_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/regexp_match.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/regexp_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/regexp_match.rb index 81d5b4ffb2..e723a5e970 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/regexp_match.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/regexp_match.rb @@ -78,8 +78,7 @@ module RuboCop # Constants are included in this list because it is unlikely that # someone will store `nil` as a constant and then use it for comparison TYPES_IMPLEMENTING_MATCH = %i[const regexp str sym].freeze - MSG = 'Use `match?` instead of `%s` when `MatchData` ' \ - 'is not used.' + MSG = 'Use `match?` instead of `%s` when `MatchData` is not used.' def_node_matcher :match_method?, <<~PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/reverse_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/reverse_each.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/reverse_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/reverse_each.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/reverse_first.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/reverse_first.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/reverse_first.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/reverse_first.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/select_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/select_map.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/select_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/select_map.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/size.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/size.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/size.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/sort_reverse.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/sort_reverse.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/sort_reverse.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/sort_reverse.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/squeeze.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/squeeze.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/squeeze.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/squeeze.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/start_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/start_with.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/start_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/start_with.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/string_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/string_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/string_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/string_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/string_replacement.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/string_replacement.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/string_replacement.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/string_replacement.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/sum.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/sum.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/sum.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/sum.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/times_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/times_map.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/times_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/times_map.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/unfreeze_string.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/unfreeze_string.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/unfreeze_string.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/unfreeze_string.rb index 2a820bee87..76119f2760 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/unfreeze_string.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/unfreeze_string.rb @@ -45,7 +45,10 @@ module RuboCop return unless dup_string?(node) || string_new?(node) add_offense(node) do |corrector| - corrector.replace(node, "+#{string_value(node)}") + string_value = "+#{string_value(node)}" + string_value = "(#{string_value})" if node.parent&.send_type? + + corrector.replace(node, string_value) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/uri_default_parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/uri_default_parser.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance/uri_default_parser.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance/uri_default_parser.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance_cops.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/cop/performance_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/cop/performance_cops.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance/version.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance/version.rb index 31f32d1565..ecab5bd04c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.3/lib/rubocop/performance/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.4/lib/rubocop/performance/version.rb @@ -4,7 +4,7 @@ module RuboCop module Performance # This module holds the RuboCop Performance version information. module Version - STRING = '1.11.3' + STRING = '1.11.4' def self.document_version STRING.match('\d+\.\d+').to_s