From 0581d7b9ba6384e8337553c99f7e1d019f8b459a Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 1 Nov 2021 18:08:35 +0000 Subject: [PATCH] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../config/default.yml | 8 +++- .../config/obsoletion.yml | 0 .../lib/rubocop-performance.rb | 0 .../rubocop/cop/mixin/regexp_metacharacter.rb | 0 .../lib/rubocop/cop/mixin/sort_block.rb | 0 .../cop/performance/ancestors_include.rb | 4 ++ .../array_semi_infinite_range_slice.rb | 4 +- .../big_decimal_with_numeric_argument.rb | 0 .../lib/rubocop/cop/performance/bind_call.rb | 0 .../block_given_with_explicit_block.rb | 0 .../lib/rubocop/cop/performance/caller.rb | 0 .../cop/performance/case_when_splat.rb | 12 +++--- .../lib/rubocop/cop/performance/casecmp.rb | 6 ++- .../cop/performance/chain_array_allocation.rb | 0 .../performance/collection_literal_in_loop.rb | 0 .../cop/performance/compare_with_block.rb | 0 .../performance/concurrent_monotonic_time.rb | 42 +++++++++++++++++++ .../cop/performance/constant_regexp.rb | 0 .../lib/rubocop/cop/performance/count.rb | 35 ++++++++++------ .../rubocop/cop/performance/delete_prefix.rb | 7 ++-- .../rubocop/cop/performance/delete_suffix.rb | 7 ++-- .../lib/rubocop/cop/performance/detect.rb | 7 +++- .../cop/performance/double_start_end_with.rb | 0 .../lib/rubocop/cop/performance/end_with.rb | 5 +++ .../lib/rubocop/cop/performance/fixed_size.rb | 0 .../lib/rubocop/cop/performance/flat_map.rb | 0 .../performance/inefficient_hash_search.rb | 3 ++ .../rubocop/cop/performance/io_readlines.rb | 0 .../rubocop/cop/performance/map_compact.rb | 6 ++- .../cop/performance/method_object_as_block.rb | 0 .../rubocop/cop/performance/open_struct.rb | 4 ++ .../rubocop/cop/performance/range_include.rb | 5 ++- .../cop/performance/redundant_block_call.rb | 1 + .../redundant_equality_comparison_block.rb | 8 ++-- .../cop/performance/redundant_match.rb | 0 .../cop/performance/redundant_merge.rb | 7 ++-- .../cop/performance/redundant_sort_block.rb | 0 .../redundant_split_regexp_argument.rb | 0 .../cop/performance/redundant_string_chars.rb | 0 .../rubocop/cop/performance/regexp_match.rb | 0 .../rubocop/cop/performance/reverse_each.rb | 0 .../rubocop/cop/performance/reverse_first.rb | 0 .../lib/rubocop/cop/performance/select_map.rb | 0 .../lib/rubocop/cop/performance/size.rb | 0 .../rubocop/cop/performance/sort_reverse.rb | 0 .../lib/rubocop/cop/performance/squeeze.rb | 0 .../lib/rubocop/cop/performance/start_with.rb | 5 +++ .../rubocop/cop/performance/string_include.rb | 3 +- .../cop/performance/string_replacement.rb | 0 .../lib/rubocop/cop/performance/sum.rb | 2 +- .../lib/rubocop/cop/performance/times_map.rb | 12 ++++++ .../cop/performance/unfreeze_string.rb | 10 ++--- .../cop/performance/uri_default_parser.rb | 0 .../lib/rubocop/cop/performance_cops.rb | 1 + .../lib/rubocop/performance.rb | 0 .../lib/rubocop/performance/inject.rb | 0 .../lib/rubocop/performance/version.rb | 2 +- 58 files changed, 156 insertions(+), 52 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/config/default.yml (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/config/obsoletion.yml (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop-performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/mixin/regexp_metacharacter.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/mixin/sort_block.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/ancestors_include.rb (87%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/bind_call.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/block_given_with_explicit_block.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/caller.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/case_when_splat.rb (91%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/casecmp.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/chain_array_allocation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/collection_literal_in_loop.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/compare_with_block.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/concurrent_monotonic_time.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/constant_regexp.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/count.rb (82%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/delete_prefix.rb (93%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/delete_suffix.rb (93%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/detect.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/double_start_end_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/end_with.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/fixed_size.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/flat_map.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/inefficient_hash_search.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/io_readlines.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/map_compact.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/method_object_as_block.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/open_struct.rb (91%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/range_include.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_block_call.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_match.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_merge.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_sort_block.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/redundant_string_chars.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/regexp_match.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/reverse_each.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/reverse_first.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/select_map.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/size.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/sort_reverse.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/squeeze.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/start_with.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/string_include.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/string_replacement.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/sum.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/times_map.rb (82%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/unfreeze_string.rb (81%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance/uri_default_parser.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/cop/performance_cops.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/performance/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-performance-1.11.5 => rubocop-performance-1.12.0}/lib/rubocop/performance/version.rb (91%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 21c651a50b..f545d5482e 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -87,7 +87,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.12.0/li $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.1.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.22.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.5/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.12.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.12.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.5.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.5/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/config/default.yml similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/config/default.yml index 9decfdd4ac..446b24a760 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/config/default.yml @@ -76,6 +76,12 @@ Performance/CompareWithBlock: Enabled: true VersionAdded: '0.46' +Performance/ConcurrentMonotonicTime: + Description: 'Use `Process.clock_gettime(Process::CLOCK_MONOTONIC)` instead of `Concurrent.monotonic_time`.' + Reference: 'https://github.com/rails/rails/pull/43502' + Enabled: pending + VersionAdded: '1.12' + Performance/ConstantRegexp: Description: 'Finds regular expressions with dynamic components that are all constants.' Enabled: pending @@ -309,9 +315,9 @@ Performance/StartWith: Performance/StringInclude: Description: 'Use `String#include?` instead of a regex match with literal-only pattern.' Enabled: 'pending' - AutoCorrect: false SafeAutoCorrect: false VersionAdded: '1.7' + VersionChanged: '1.12' Performance/StringReplacement: Description: >- diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/config/obsoletion.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/config/obsoletion.yml similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/config/obsoletion.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/config/obsoletion.yml diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop-performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop-performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop-performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop-performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/mixin/regexp_metacharacter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/mixin/regexp_metacharacter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/mixin/regexp_metacharacter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/mixin/sort_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/mixin/sort_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/mixin/sort_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/ancestors_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/ancestors_include.rb similarity index 87% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/ancestors_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/ancestors_include.rb index b1e9109983..5d3b577428 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/ancestors_include.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/ancestors_include.rb @@ -6,6 +6,10 @@ module RuboCop # This cop is used to identify usages of `ancestors.include?` and # change them to use `<=` instead. # + # @safety + # This cop is unsafe because it can't tell whether the receiver is a class or an object. + # e.g. the false positive was for `Nokogiri::XML::Node#ancestors`. + # # @example # # bad # A.ancestors.include?(B) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb index caef078b90..04f417fd2a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb @@ -7,7 +7,9 @@ module RuboCop # can be replaced by `Array#take` and `Array#drop`. # This cop was created due to a mistake in microbenchmark and hence is disabled by default. # Refer https://github.com/rubocop/rubocop-performance/pull/175#issuecomment-731892717 - # This cop is also unsafe for string slices because strings do not have `#take` and `#drop` methods. + # + # @safety + # This cop is unsafe for string slices because strings do not have `#take` and `#drop` methods. # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/bind_call.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/bind_call.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/bind_call.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/block_given_with_explicit_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/block_given_with_explicit_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/caller.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/caller.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/caller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/caller.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/case_when_splat.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/case_when_splat.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/case_when_splat.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/case_when_splat.rb index ceb1d5a185..241bc8a94c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/case_when_splat.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/case_when_splat.rb @@ -17,11 +17,13 @@ module RuboCop # this defining a higher level when condition to override a condition # that is inside of the splat expansion. # - # This is not a guaranteed performance improvement. If the data being - # processed by the `case` condition is normalized in a manner that favors - # hitting a condition in the splat expansion, it is possible that - # moving the splat condition to the end will use more memory, - # and run slightly slower. + # @safety + # This cop is not unsafe auto-correction because it is not a guaranteed + # performance improvement. If the data being processed by the `case` condition is + # normalized in a manner that favors hitting a condition in the splat expansion, + # it is possible that moving the splat condition to the end will use more memory, + # and run slightly slower. + # See for more details: https://github.com/rubocop/rubocop/pull/6163 # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/casecmp.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/casecmp.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/casecmp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/casecmp.rb index c981757c79..b92ef41a14 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/casecmp.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/casecmp.rb @@ -5,8 +5,10 @@ module RuboCop module Performance # This cop identifies places where a case-insensitive string comparison # can better be implemented using `casecmp`. - # This cop is unsafe because `String#casecmp` and `String#casecmp?` behave - # differently when using Non-ASCII characters. + # + # @safety + # This cop is unsafe because `String#casecmp` and `String#casecmp?` behave + # differently when using Non-ASCII characters. # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/chain_array_allocation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/chain_array_allocation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/chain_array_allocation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/collection_literal_in_loop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/collection_literal_in_loop.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/collection_literal_in_loop.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/collection_literal_in_loop.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/compare_with_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/compare_with_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/compare_with_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/concurrent_monotonic_time.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/concurrent_monotonic_time.rb new file mode 100644 index 0000000000..a636b00cfb --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/concurrent_monotonic_time.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Performance + # This cop identifies places where `Concurrent.monotonic_time` + # can be replaced by `Process.clock_gettime(Process::CLOCK_MONOTONIC)`. + # + # @example + # + # # bad + # Concurrent.monotonic_time + # + # # good + # Process.clock_gettime(Process::CLOCK_MONOTONIC) + # + class ConcurrentMonotonicTime < Base + extend AutoCorrector + + MSG = 'Use `%s` instead of `%s`.' + RESTRICT_ON_SEND = %i[monotonic_time].freeze + + def_node_matcher :concurrent_monotonic_time?, <<~PATTERN + (send + (const {nil? cbase} :Concurrent) :monotonic_time ...) + PATTERN + + def on_send(node) + return unless concurrent_monotonic_time?(node) + + optional_unit_parameter = ", #{node.first_argument.source}" if node.first_argument + prefer = "Process.clock_gettime(Process::CLOCK_MONOTONIC#{optional_unit_parameter})" + message = format(MSG, prefer: prefer, current: node.source) + + add_offense(node, message: message) do |corrector| + corrector.replace(node, prefer) + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/constant_regexp.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/constant_regexp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/constant_regexp.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/count.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/count.rb similarity index 82% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/count.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/count.rb index d6c6ad0501..935ba4cd12 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/count.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/count.rb @@ -7,6 +7,28 @@ module RuboCop # follow calls to `select`, `find_all`, `filter` or `reject`. Querying logic can instead be # passed to the `count` call. # + # @safety + # This cop is unsafe because it has known compatibility issues with `ActiveRecord` and other + # frameworks. ActiveRecord's `count` ignores the block that is passed to it. + # `ActiveRecord` will ignore the block that is passed to `count`. + # Other methods, such as `select`, will convert the association to an + # array and then run the block on the array. A simple work around to + # make `count` work with a block is to call `to_a.count {...}`. + # + # For example: + # + # [source,ruby] + # ---- + # `Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size` + # ---- + # + # becomes: + # + # [source,ruby] + # ---- + # `Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }` + # ---- + # # @example # # bad # [1, 2, 3].select { |e| e > 2 }.size @@ -24,19 +46,6 @@ module RuboCop # [1, 2, 3].count { |e| e < 2 && e.even? } # Model.select('field AS field_one').count # Model.select(:value).count - # - # `ActiveRecord` compatibility: - # `ActiveRecord` will ignore the block that is passed to `count`. - # Other methods, such as `select`, will convert the association to an - # array and then run the block on the array. A simple work around to - # make `count` work with a block is to call `to_a.count {...}`. - # - # Example: - # `Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size` - # - # becomes: - # - # `Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }` class Count < Base include RangeHelp extend AutoCorrector diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_prefix.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_prefix.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_prefix.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_prefix.rb index 998b7543af..e0279adc89 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_prefix.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_prefix.rb @@ -7,7 +7,6 @@ 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` @@ -15,6 +14,9 @@ module RuboCop # # The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. # + # @safety + # This cop is unsafe because `Pathname` has `sub` but not `delete_prefix`. + # # @example # # # bad @@ -47,9 +49,6 @@ module RuboCop class DeletePrefix < Base include RegexpMetacharacter extend AutoCorrector - extend TargetRubyVersion - - minimum_target_ruby_version 2.5 MSG = 'Use `%s` instead of `%s`.' RESTRICT_ON_SEND = %i[gsub gsub! sub sub!].freeze diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_suffix.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_suffix.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_suffix.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_suffix.rb index 6559b44792..49fe964397 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/delete_suffix.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/delete_suffix.rb @@ -7,7 +7,6 @@ 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?` @@ -15,6 +14,9 @@ module RuboCop # # The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. # + # @safety + # This cop is unsafe because `Pathname` has `sub` but not `delete_suffix`. + # # @example # # # bad @@ -47,9 +49,6 @@ module RuboCop class DeleteSuffix < Base include RegexpMetacharacter extend AutoCorrector - extend TargetRubyVersion - - minimum_target_ruby_version 2.5 MSG = 'Use `%s` instead of `%s`.' RESTRICT_ON_SEND = %i[gsub gsub! sub sub!].freeze diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/detect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/detect.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/detect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/detect.rb index fad524847b..ac413e7cc9 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/detect.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/detect.rb @@ -7,6 +7,11 @@ module RuboCop # chained to `select`, `find_all` or `filter` and change them to use # `detect` instead. # + # @safety + # This cop is unsafe because is has known compatibility issues with `ActiveRecord` and other + # frameworks. `ActiveRecord` does not implement a `detect` method and `find` has its own + # meaning. Correcting `ActiveRecord` methods with this cop should be considered unsafe. + # # @example # # bad # [].select { |item| true }.first @@ -90,7 +95,7 @@ module RuboCop end def replacement(method, index) - if method == :last || method == :[] && index == -1 + if method == :last || (method == :[] && index == -1) "reverse.#{preferred_method}" else preferred_method diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/double_start_end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/double_start_end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/end_with.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/end_with.rb index 155c48f8a2..b9b19fff12 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/end_with.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/end_with.rb @@ -9,6 +9,11 @@ module RuboCop # `end$` is unsafe as it will behave incompatible with `end_with?` # for receiver is multiline string. # + # @safety + # This will change to a new method call which isn't guaranteed to be on the + # object. Switching these methods has to be done with knowledge of the types + # of the variables which rubocop doesn't have. + # # @example # # bad # 'abc'.match?(/bc\Z/) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/fixed_size.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/fixed_size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/fixed_size.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/flat_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/flat_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/flat_map.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/inefficient_hash_search.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/inefficient_hash_search.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/inefficient_hash_search.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/inefficient_hash_search.rb index a5c47def6c..cf6cf6e432 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/inefficient_hash_search.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/inefficient_hash_search.rb @@ -15,6 +15,9 @@ module RuboCop # both perform an O(n) search through all of the values, calling `values` # allocates a new array while using `value?` does not. # + # @safety + # This cop is unsafe because it can't tell whether the receiver is a hash object. + # # @example # # bad # { a: 1, b: 2 }.keys.include?(:a) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/io_readlines.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/io_readlines.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/io_readlines.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/map_compact.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/map_compact.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/map_compact.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/map_compact.rb index 4082319601..6cba8a07e1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/map_compact.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/map_compact.rb @@ -6,8 +6,10 @@ module RuboCop # In Ruby 2.7, `Enumerable#filter_map` has been added. # # This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`. - # It is marked as unsafe auto-correction by default because `map { ... }.compact` - # that is not compatible with `filter_map`. + # + # @safety + # This cop's autocorrection is unsafe because `map { ... }.compact` that is not + # compatible with `filter_map`. # # [source,ruby] # ---- diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/method_object_as_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/method_object_as_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/open_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/open_struct.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/open_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/open_struct.rb index 6709b68e14..1395bd899c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/open_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/open_struct.rb @@ -11,6 +11,10 @@ module RuboCop # especially in case of single-threaded # applications with multiple `OpenStruct` instantiations. # + # @safety + # This cop is unsafe because `OpenStruct.new` and `Struct.new` + # are not equivalent. + # # @example # # bad # class MyClass diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/range_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/range_include.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/range_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/range_include.rb index e39dcc2400..8308ac3aa4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/range_include.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/range_include.rb @@ -9,8 +9,9 @@ module RuboCop # end points of the `Range`. In a great majority of cases, this is what # is wanted. # - # This cop is `Safe: false` by default because `Range#include?` (or `Range#member?`) and - # `Range#cover?` are not equivalent behaviour. + # @safety + # This cop is unsafe because `Range#include?` (or `Range#member?`) and `Range#cover?` + # are not equivalent behaviour. # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_block_call.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_block_call.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_block_call.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_block_call.rb index 27ad168809..bf5a23dcc8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_block_call.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_block_call.rb @@ -55,6 +55,7 @@ module RuboCop end end end + alias on_defs on_def private diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb index d1ef3db49a..eb233388d3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb @@ -9,8 +9,9 @@ module RuboCop # By default, `Object#===` behaves the same as `Object#==`, but this # behavior is appropriately overridden in subclass. For example, # `Range#===` returns `true` when argument is within the range. - # Therefore, It is marked as unsafe by default because `===` and `==` - # do not always behave the same. + # + # @safety + # This cop is unsafe because `===` and `==` do not always behave the same. # # @example # # bad @@ -24,9 +25,6 @@ module RuboCop # class RedundantEqualityComparisonBlock < Base extend AutoCorrector - extend TargetRubyVersion - - minimum_target_ruby_version 2.5 MSG = 'Use `%s` instead of block.' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/redundant_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_match.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_merge.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_merge.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_merge.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_merge.rb index ee920ef50a..6bc5458e51 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_merge.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_merge.rb @@ -8,8 +8,9 @@ module RuboCop # You can set the maximum number of key-value pairs to consider # an offense with `MaxKeyValuePairs`. # - # This cop is marked as unsafe because RuboCop cannot determine if the - # receiver of `merge!` is actually a hash or not. + # @safety + # This cop is unsafe because RuboCop cannot determine if the + # receiver of `merge!` is actually a hash or not. # # @example # # bad @@ -91,7 +92,7 @@ module RuboCop end def non_redundant_pairs?(receiver, pairs) - pairs.size > 1 && !receiver.pure? || pairs.size > max_key_value_pairs + (pairs.size > 1 && !receiver.pure?) || pairs.size > max_key_value_pairs end def kwsplat_used?(pairs) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_sort_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/redundant_sort_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_sort_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/redundant_string_chars.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_string_chars.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/redundant_string_chars.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/redundant_string_chars.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/regexp_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/regexp_match.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/regexp_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/regexp_match.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/reverse_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/reverse_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/reverse_each.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/reverse_first.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/reverse_first.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/reverse_first.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/select_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/select_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/select_map.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/size.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/size.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/size.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/sort_reverse.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/sort_reverse.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/sort_reverse.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/squeeze.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/squeeze.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/squeeze.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/squeeze.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/start_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/start_with.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/start_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/start_with.rb index c55ac7af5c..d813ca5100 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/start_with.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/start_with.rb @@ -9,6 +9,11 @@ module RuboCop # `^start` is unsafe as it will behave incompatible with `start_with?` # for receiver is multiline string. # + # @safety + # This will change to a new method call which isn't guaranteed to be on the + # object. Switching these methods has to be done with knowledge of the types + # of the variables which rubocop doesn't have. + # # @example # # bad # 'abc'.match?(/\Aab/) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/string_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/string_include.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/string_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/string_include.rb index c549300aff..415e02c929 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/string_include.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/string_include.rb @@ -6,7 +6,8 @@ module RuboCop # This cop identifies unnecessary use of a regex where # `String#include?` would suffice. # - # This cop's offenses are not safe to auto-correct if a receiver is nil. + # @safety + # This cop's offenses are not safe to auto-correct if a receiver is nil. # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/string_replacement.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/string_replacement.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/string_replacement.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/sum.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/sum.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/sum.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/sum.rb index df336773b3..30067a4c09 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/sum.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/sum.rb @@ -156,7 +156,7 @@ module RuboCop end def sum_method_range(node) - range_between(node.loc.selector.begin_pos, node.loc.end.end_pos) + range_between(node.loc.selector.begin_pos, node.loc.expression.end_pos) end def sum_map_range(map, sum) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/times_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/times_map.rb similarity index 82% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/times_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/times_map.rb index 907983a04c..6e297893cd 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/times_map.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/times_map.rb @@ -7,6 +7,18 @@ module RuboCop # In most cases such calls can be replaced # with an explicit array creation. # + # @safety + # This cop's autocorrection is unsafe because `Integer#times` does nothing if receiver is 0 + # or less. However, `Array.new` raises an error if argument is less than 0. + # + # For example: + # + # [source,ruby] + # ---- + # -1.times{} # does nothing + # Array.new(-1) # ArgumentError: negative array size + # ---- + # # @example # # bad # 9.times.map do |i| diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/unfreeze_string.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/unfreeze_string.rb similarity index 81% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/unfreeze_string.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/unfreeze_string.rb index 76119f2760..7860c269c7 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/unfreeze_string.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/unfreeze_string.rb @@ -7,11 +7,11 @@ module RuboCop # literal instead of `String#dup` and `String.new`. # Unary plus operator is faster than `String#dup`. # - # NOTE: `String.new` (without operator) is not exactly the same as `+''`. - # These differ in encoding. `String.new.encoding` is always `ASCII-8BIT`. - # However, `(+'').encoding` is the same as script encoding(e.g. `UTF-8`). - # Therefore, auto-correction is unsafe. - # So, if you expect `ASCII-8BIT` encoding, disable this cop. + # @safety + # This cop's autocorrection is unsafe because `String.new` (without operator) is not + # exactly the same as `+''`. These differ in encoding. `String.new.encoding` is always + # `ASCII-8BIT`. However, `(+'').encoding` is the same as script encoding(e.g. `UTF-8`). + # if you expect `ASCII-8BIT` encoding, disable this cop. # # @example # # bad diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance/uri_default_parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5/lib/rubocop/cop/performance/uri_default_parser.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance/uri_default_parser.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance_cops.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance_cops.rb index 53f8a9330d..fc363b712d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/cop/performance_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/cop/performance_cops.rb @@ -13,6 +13,7 @@ require_relative 'performance/case_when_splat' require_relative 'performance/casecmp' require_relative 'performance/collection_literal_in_loop' require_relative 'performance/compare_with_block' +require_relative 'performance/concurrent_monotonic_time' require_relative 'performance/constant_regexp' require_relative 'performance/count' require_relative 'performance/delete_prefix' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance/version.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/lib/rubocop/performance/version.rb index 5fdad36993..805b4b613a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.11.5/lib/rubocop/performance/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-performance-1.12.0/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.5' + STRING = '1.12.0' def self.document_version STRING.match('\d+\.\d+').to_s