From c3f7b7f94c04ba01076f16a7e5e3ccb616f0e8f0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 20 May 2019 16:58:14 +0100 Subject: [PATCH] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../config/default.yml | 209 ++++++++++++++++++ .../lib/rubocop-performance.rb | 0 .../lib/rubocop/cop/performance/caller.rb | 4 +- .../cop/performance/case_when_splat.rb | 4 +- .../lib/rubocop/cop/performance/casecmp.rb | 2 +- .../cop/performance/chain_array_allocation.rb | 10 +- .../cop/performance/compare_with_block.rb | 2 +- .../lib/rubocop/cop/performance/count.rb | 2 +- .../lib/rubocop/cop/performance/detect.rb | 4 +- .../cop/performance/double_start_end_with.rb | 2 +- .../lib/rubocop/cop/performance/end_with.rb | 4 +- .../lib/rubocop/cop/performance/fixed_size.rb | 2 +- .../lib/rubocop/cop/performance/flat_map.rb | 4 +- .../performance/inefficient_hash_search.rb | 0 .../rubocop/cop/performance/open_struct.rb | 2 +- .../rubocop/cop/performance/range_include.rb | 2 +- .../cop/performance/redundant_block_call.rb | 10 +- .../cop/performance/redundant_match.rb | 2 +- .../cop/performance/redundant_merge.rb | 6 +- .../rubocop/cop/performance/regexp_match.rb | 10 +- .../rubocop/cop/performance/reverse_each.rb | 4 +- .../lib/rubocop/cop/performance/size.rb | 4 +- .../lib/rubocop/cop/performance/start_with.rb | 4 +- .../cop/performance/string_replacement.rb | 10 +- .../lib/rubocop/cop/performance/times_map.rb | 4 +- .../cop/performance/unfreeze_string.rb | 2 +- .../cop/performance/uri_default_parser.rb | 2 +- .../lib/rubocop/cop/performance_cops.rb | 0 .../lib/rubocop/performance.rb | 0 .../lib/rubocop/performance/inject.rb | 0 .../lib/rubocop/performance/version.rb | 2 +- 32 files changed, 262 insertions(+), 53 deletions(-) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/config/default.yml rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop-performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/caller.rb (93%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/case_when_splat.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/casecmp.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/chain_array_allocation.rb (91%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/compare_with_block.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/count.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/detect.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/double_start_end_with.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/end_with.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/fixed_size.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/flat_map.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/inefficient_hash_search.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/open_struct.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/range_include.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/redundant_block_call.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/redundant_match.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/redundant_merge.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/regexp_match.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/reverse_each.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/size.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/start_with.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/string_replacement.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/times_map.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/unfreeze_string.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance/uri_default_parser.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/cop/performance_cops.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/performance/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.2.0 => rubocop-performance-1.3.0}/lib/rubocop/performance/version.rb (77%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 32440938e7..20fc3fb6a6 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -62,7 +62,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.69.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.2.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.33.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-cobertura-1.3.1/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/config/default.yml new file mode 100644 index 0000000000..cc896dd05d --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/config/default.yml @@ -0,0 +1,209 @@ +# This is the default configuration file. + +Performance/Caller: + Description: >- + Use `caller(n..n)` instead of `caller`. + Enabled: true + VersionAdded: '0.49' + +Performance/CaseWhenSplat: + Description: >- + Reordering `when` conditions with a splat to the end + of the `when` branches can improve performance. + Enabled: false + AutoCorrect: false + SafeAutoCorrect: false + VersionAdded: '0.34' + VersionChanged: '0.59' + +Performance/Casecmp: + Description: >- + Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`.. + Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code' + Enabled: true + VersionAdded: '0.36' + +Performance/ChainArrayAllocation: + Description: >- + Instead of chaining array methods that allocate new arrays, mutate an + existing array. + Reference: 'https://twitter.com/schneems/status/1034123879978029057' + Enabled: false + VersionAdded: '0.59' + +Performance/CompareWithBlock: + Description: 'Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.' + Enabled: true + VersionAdded: '0.46' + +Performance/Count: + Description: >- + Use `count` instead of `select...size`, `reject...size`, + `select...count`, `reject...count`, `select...length`, + and `reject...length`. + # This cop has known compatibility issues with `ActiveRecord` and other + # frameworks. ActiveRecord's `count` ignores the block that is passed to it. + # For more information, see the documentation in the cop itself. + # If you understand the known risk, you can disable `SafeMode`. + SafeMode: true + Enabled: true + VersionAdded: '0.31' + VersionChanged: '0.39' + +Performance/Detect: + Description: >- + Use `detect` instead of `select.first`, `find_all.first`, + `select.last`, and `find_all.last`. + Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code' + # This cop 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. + SafeMode: true + Enabled: true + VersionAdded: '0.30' + VersionChanged: '0.39' + +Performance/DoubleStartEndWith: + Description: >- + Use `str.{start,end}_with?(x, ..., y, ...)` + instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`. + Enabled: true + VersionAdded: '0.36' + VersionChanged: '0.48' + # Used to check for `starts_with?` and `ends_with?`. + # These methods are defined by `ActiveSupport`. + IncludeActiveSupportAliases: false + +Performance/EndWith: + Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end' + # 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. + SafeAutoCorrect: false + AutoCorrect: false + Enabled: true + VersionAdded: '0.36' + VersionChanged: '0.44' + +Performance/FixedSize: + Description: 'Do not compute the size of statically sized objects except in constants' + Enabled: true + VersionAdded: '0.35' + +Performance/FlatMap: + Description: >- + Use `Enumerable#flat_map` + instead of `Enumerable#map...Array#flatten(1)` + or `Enumberable#collect..Array#flatten(1)` + Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code' + Enabled: true + VersionAdded: '0.30' + EnabledForFlattenWithoutParams: false + # If enabled, this cop will warn about usages of + # `flatten` being called without any parameters. + # This can be dangerous since `flat_map` will only flatten 1 level, and + # `flatten` without any parameters can flatten multiple levels. + +Performance/InefficientHashSearch: + Description: 'Use `key?` or `value?` instead of `keys.include?` or `values.include?`' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashkey-instead-of-hashkeysinclude-code' + Enabled: true + VersionAdded: '0.56' + Safe: false + +Performance/OpenStruct: + Description: 'Use `Struct` instead of `OpenStruct`.' + Enabled: false + VersionAdded: '0.61' + Safe: false + +Performance/RangeInclude: + Description: 'Use `Range#cover?` instead of `Range#include?`.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code' + Enabled: true + VersionAdded: '0.36' + Safe: false + +Performance/RedundantBlockCall: + Description: 'Use `yield` instead of `block.call`.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#proccall-and-block-arguments-vs-yieldcode' + Enabled: true + VersionAdded: '0.36' + +Performance/RedundantMatch: + Description: >- + Use `=~` instead of `String#match` or `Regexp#match` in a context where the + returned `MatchData` is not needed. + Enabled: true + VersionAdded: '0.36' + +Performance/RedundantMerge: + Description: 'Use Hash#[]=, rather than Hash#merge! with a single key-value pair.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code' + Enabled: true + VersionAdded: '0.36' + # Max number of key-value pairs to consider an offense + MaxKeyValuePairs: 2 + +Performance/RegexpMatch: + Description: >- + Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, + `Regexp#===`, or `=~` when `MatchData` is not used. + Reference: 'https://github.com/JuanitoFatas/fast-ruby#regexp-vs-stringmatch-vs-string-vs-stringmatch-code-' + Enabled: true + VersionAdded: '0.47' + +Performance/ReverseEach: + Description: 'Use `reverse_each` instead of `reverse.each`.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code' + Enabled: true + VersionAdded: '0.30' + +Performance/Size: + Description: >- + Use `size` instead of `count` for counting + the number of elements in `Array` and `Hash`. + Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraylength-vs-arraysize-vs-arraycount-code' + Enabled: true + VersionAdded: '0.30' + +Performance/StartWith: + Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.' + Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end' + # 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. + SafeAutoCorrect: false + AutoCorrect: false + Enabled: true + VersionAdded: '0.36' + VersionChanged: '0.44' + +Performance/StringReplacement: + Description: >- + Use `tr` instead of `gsub` when you are replacing the same + number of characters. Use `delete` instead of `gsub` when + you are deleting characters. + Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code' + Enabled: true + VersionAdded: '0.33' + +Performance/TimesMap: + Description: 'Checks for .times.map calls.' + AutoCorrect: false + Enabled: true + VersionAdded: '0.36' + VersionChanged: '0.50' + SafeAutoCorrect: false # see https://github.com/rubocop-hq/rubocop/issues/4658 + +Performance/UnfreezeString: + Description: 'Use unary plus to get an unfrozen string literal.' + Enabled: true + VersionAdded: '0.50' + +Performance/UriDefaultParser: + Description: 'Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.' + Enabled: true + VersionAdded: '0.50' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop-performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop-performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop-performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop-performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/caller.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/caller.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/caller.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/caller.rb index 92a70e76a2..a0fcc601ea 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/caller.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/caller.rb @@ -20,9 +20,9 @@ module RuboCop # caller_locations(1..1).first class Caller < Cop MSG_BRACE = 'Use `%s(%d..%d).first`' \ - ' instead of `%s[%d]`.'.freeze + ' instead of `%s[%d]`.' MSG_FIRST = 'Use `%s(%d..%d).first`' \ - ' instead of `%s.first`.'.freeze + ' instead of `%s.first`.' def_node_matcher :slow_caller?, <<-PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/case_when_splat.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/case_when_splat.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/case_when_splat.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/case_when_splat.rb index a536425ad8..1455561cff 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/case_when_splat.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/case_when_splat.rb @@ -58,9 +58,9 @@ module RuboCop include RangeHelp MSG = 'Reordering `when` conditions with a splat to the end ' \ - 'of the `when` branches can improve performance.'.freeze + 'of the `when` branches can improve performance.' ARRAY_MSG = 'Pass the contents of array literals ' \ - 'directly to `when` conditions.'.freeze + 'directly to `when` conditions.' def on_case(case_node) when_conditions = case_node.when_branches.flat_map(&:conditions) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/casecmp.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/casecmp.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/casecmp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/casecmp.rb index ad9424bf39..c411eca255 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/casecmp.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/casecmp.rb @@ -18,7 +18,7 @@ module RuboCop # str.casecmp('ABC').zero? # 'abc'.casecmp(str).zero? class Casecmp < Cop - MSG = 'Use `%s` instead of `%s`.'.freeze + MSG = 'Use `%s` instead of `%s`.' CASE_METHODS = %i[downcase upcase].freeze def_node_matcher :downcase_eq, <<-PATTERN diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/chain_array_allocation.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/chain_array_allocation.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/chain_array_allocation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/chain_array_allocation.rb index dcad63ef8a..49620cea8e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/chain_array_allocation.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/chain_array_allocation.rb @@ -29,10 +29,10 @@ module RuboCop # [1,2].first # => 1 # [1,2].first(1) # => [1] # - RETURN_NEW_ARRAY_WHEN_ARGS = ':first :last :pop :sample :shift '.freeze + RETURN_NEW_ARRAY_WHEN_ARGS = ':first :last :pop :sample :shift ' # These methods return a new array only when called without a block. - RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = ':zip :product '.freeze + RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = ':zip :product ' # These methods ALWAYS return a new array # after they're called it's safe to mutate the the resulting array @@ -40,16 +40,16 @@ module RuboCop ':drop_while :flatten :map :reject ' \ ':reverse :rotate :select :shuffle :sort ' \ ':take :take_while :transpose :uniq ' \ - ':values_at :| '.freeze + ':values_at :| ' # These methods have a mutation alternative. For example :collect # can be called as :collect! HAS_MUTATION_ALTERNATIVE = ':collect :compact :flatten :map :reject '\ ':reverse :rotate :select :shuffle :sort '\ - ':uniq '.freeze + ':uniq ' MSG = 'Use unchained `%s!` and `%s!` '\ '(followed by `return array` if required) instead of chaining '\ - '`%s...%s`.'.freeze + '`%s...%s`.' def_node_matcher :flat_map_candidate?, <<-PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/compare_with_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/compare_with_block.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/compare_with_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/compare_with_block.rb index a9b80a75a1..040e6e47b2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/compare_with_block.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/compare_with_block.rb @@ -28,7 +28,7 @@ module RuboCop MSG = 'Use `%s_by%s` instead of ' \ '`%s { |%s, %s| %s ' \ - '<=> %s }`.'.freeze + '<=> %s }`.' def_node_matcher :compare?, <<-PATTERN (block diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/count.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/count.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/count.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/count.rb index cdbee4166d..7dc54ec9ae 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/count.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/count.rb @@ -41,7 +41,7 @@ module RuboCop include SafeMode include RangeHelp - MSG = 'Use `count` instead of `%s...%s`.'.freeze + MSG = 'Use `count` instead of `%s...%s`.' def_node_matcher :count_candidate?, <<-PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/detect.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/detect.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/detect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/detect.rb index 417e2b6ca2..b22ea5d44f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/detect.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/detect.rb @@ -26,9 +26,9 @@ module RuboCop include SafeMode MSG = 'Use `%s` instead of ' \ - '`%s.%s`.'.freeze + '`%s.%s`.' REVERSE_MSG = 'Use `reverse.%s` instead of ' \ - '`%s.%s`.'.freeze + '`%s.%s`.' def_node_matcher :detect_candidate?, <<-PATTERN { diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/double_start_end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/double_start_end_with.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/double_start_end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/double_start_end_with.rb index b53d78b46f..530c41d424 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/double_start_end_with.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/double_start_end_with.rb @@ -19,7 +19,7 @@ module RuboCop # str.end_with?(var1, var2) class DoubleStartEndWith < Cop MSG = 'Use `%s.%s(%s)` ' \ - 'instead of `%s`.'.freeze + 'instead of `%s`.' def on_or(node) receiver, diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/end_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/end_with.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/end_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/end_with.rb index 2f7c365177..b4d8fa6d04 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/end_with.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/end_with.rb @@ -16,8 +16,8 @@ module RuboCop # 'abc'.end_with?('bc') class EndWith < Cop MSG = 'Use `String#end_with?` instead of a regex match anchored to ' \ - 'the end of the string.'.freeze - SINGLE_QUOTE = "'".freeze + 'the end of the string.' + SINGLE_QUOTE = "'" def_node_matcher :redundant_regex?, <<-PATTERN {(send $!nil? {:match :=~ :match?} (regexp (str $#literal_at_end?) (regopt))) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/fixed_size.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/fixed_size.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/fixed_size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/fixed_size.rb index 77ea32f5d9..785d4d17c5 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/fixed_size.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/fixed_size.rb @@ -46,7 +46,7 @@ module RuboCop # waldo.size # class FixedSize < Cop - MSG = 'Do not compute the size of statically sized objects.'.freeze + MSG = 'Do not compute the size of statically sized objects.' def_node_matcher :counter, <<-MATCHER (send ${array hash str sym} {:count :length :size} $...) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/flat_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/flat_map.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/flat_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/flat_map.rb index 71f9b7b562..c90932f71d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/flat_map.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/flat_map.rb @@ -17,10 +17,10 @@ module RuboCop class FlatMap < Cop include RangeHelp - MSG = 'Use `flat_map` instead of `%s...%s`.'.freeze + MSG = 'Use `flat_map` instead of `%s...%s`.' FLATTEN_MULTIPLE_LEVELS = ' Beware, `flat_map` only flattens 1 level ' \ 'and `flatten` can be used to flatten ' \ - 'multiple levels.'.freeze + 'multiple levels.' def_node_matcher :flat_map_candidate?, <<-PATTERN (send (block $(send _ ${:collect :map}) ...) ${:flatten :flatten!} $...) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/inefficient_hash_search.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/inefficient_hash_search.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/inefficient_hash_search.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/inefficient_hash_search.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/open_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/open_struct.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/open_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/open_struct.rb index fb1e88c26a..d3d3e212aa 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/open_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/open_struct.rb @@ -29,7 +29,7 @@ module RuboCop # class OpenStruct < Cop MSG = 'Consider using `Struct` over `OpenStruct` ' \ - 'to optimize the performance.'.freeze + 'to optimize the performance.' def_node_matcher :open_struct, <<-PATTERN (send (const {nil? cbase} :OpenStruct) :new ...) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/range_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/range_include.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/range_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/range_include.rb index be31278050..77eebc8bbc 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/range_include.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/range_include.rb @@ -24,7 +24,7 @@ module RuboCop # # ('a'..'z').cover?('yellow') # => true class RangeInclude < Cop - MSG = 'Use `Range#cover?` instead of `Range#include?`.'.freeze + MSG = 'Use `Range#cover?` instead of `Range#include?`.' # TODO: If we traced out assignments of variables to their uses, we # might pick up on a few more instances of this issue diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_block_call.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_block_call.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_block_call.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_block_call.rb index 0adaa4a8a8..315deac115 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_block_call.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_block_call.rb @@ -23,11 +23,11 @@ module RuboCop # yield 1, 2, 3 # end class RedundantBlockCall < Cop - MSG = 'Use `yield` instead of `%s.call`.'.freeze - YIELD = 'yield'.freeze - OPEN_PAREN = '('.freeze - CLOSE_PAREN = ')'.freeze - SPACE = ' '.freeze + MSG = 'Use `yield` instead of `%s.call`.' + YIELD = 'yield' + OPEN_PAREN = '(' + CLOSE_PAREN = ')' + SPACE = ' ' def_node_matcher :blockarg_def, <<-PATTERN {(def _ (args ... (blockarg $_)) $_) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_match.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_match.rb index 166fb3f71f..b1eabc8ae4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_match.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_match.rb @@ -19,7 +19,7 @@ module RuboCop # return value unless regex =~ 'str' class RedundantMatch < Cop MSG = 'Use `=~` in places where the `MatchData` returned by ' \ - '`#match` will not be used.'.freeze + '`#match` will not be used.' # 'match' is a fairly generic name, so we don't flag it unless we see # a string or regexp literal on one side or the other diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_merge.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_merge.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_merge.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_merge.rb index 0d655ed6e9..2e43734520 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/redundant_merge.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/redundant_merge.rb @@ -11,10 +11,10 @@ module RuboCop # hash.merge!({'key' => 'value'}) # hash.merge!(a: 1, b: 2) class RedundantMerge < Cop - AREF_ASGN = '%s[%s] = %s'.freeze - MSG = 'Use `%s` instead of `%s`.'.freeze + AREF_ASGN = '%s[%s] = %s' + MSG = 'Use `%s` instead of `%s`.' - WITH_MODIFIER_CORRECTION = <<-RUBY.strip_indent + WITH_MODIFIER_CORRECTION = <<~RUBY %s %s %s%s%s %send diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/regexp_match.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/regexp_match.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/regexp_match.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/regexp_match.rb index 000485a039..9c9f8e130a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/regexp_match.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/regexp_match.rb @@ -80,14 +80,14 @@ 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.'.freeze + MSG = 'Use `match?` instead of `%s` when `MatchData` ' \ + 'is not used.' def_node_matcher :match_method?, <<-PATTERN { (send _recv :match _ ) - (send _recv :match _) + (send _recv :match {regexp str sym}) + (send {regexp str sym} :match _) } PATTERN @@ -106,7 +106,7 @@ module RuboCop regexp.to_regexp.named_captures.empty? end - MATCH_NODE_PATTERN = <<-PATTERN.freeze + MATCH_NODE_PATTERN = <<-PATTERN { #match_method? #match_operator? diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/reverse_each.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/reverse_each.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/reverse_each.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/reverse_each.rb index dbd4d9316c..6c6fdfba14 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/reverse_each.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/reverse_each.rb @@ -15,8 +15,8 @@ module RuboCop class ReverseEach < Cop include RangeHelp - MSG = 'Use `reverse_each` instead of `reverse.each`.'.freeze - UNDERSCORE = '_'.freeze + MSG = 'Use `reverse_each` instead of `reverse.each`.' + UNDERSCORE = '_' def_node_matcher :reverse_each?, <<-MATCHER (send $(send _ :reverse) :each) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/size.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/size.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/size.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/size.rb index 64728c367c..e9955927b7 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/size.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/size.rb @@ -24,7 +24,7 @@ module RuboCop # TODO: Add advanced detection of variables that could # have been assigned to an array or a hash. class Size < Cop - MSG = 'Use `size` instead of `count`.'.freeze + MSG = 'Use `size` instead of `count`.' def on_send(node) return unless eligible_node?(node) @@ -51,7 +51,7 @@ module RuboCop end def allowed_parent?(node) - node && node.block_type? + node&.block_type? end def array?(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/start_with.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/start_with.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/start_with.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/start_with.rb index 062957c5e0..50ba3d4844 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/start_with.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/start_with.rb @@ -16,8 +16,8 @@ module RuboCop # 'abc'.start_with?('ab') class StartWith < Cop MSG = 'Use `String#start_with?` instead of a regex match anchored to ' \ - 'the beginning of the string.'.freeze - SINGLE_QUOTE = "'".freeze + 'the beginning of the string.' + SINGLE_QUOTE = "'" def_node_matcher :redundant_regex?, <<-PATTERN {(send $!nil? {:match :=~ :match?} (regexp (str $#literal_at_start?) (regopt))) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/string_replacement.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/string_replacement.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/string_replacement.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/string_replacement.rb index 848180ec08..b5b0a4dafd 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/string_replacement.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/string_replacement.rb @@ -21,12 +21,12 @@ module RuboCop class StringReplacement < Cop include RangeHelp - MSG = 'Use `%s` instead of `%s`.'.freeze + MSG = 'Use `%s` instead of `%s`.' DETERMINISTIC_REGEX = /\A(?:#{LITERAL_REGEX})+\Z/.freeze - DELETE = 'delete'.freeze - TR = 'tr'.freeze - BANG = '!'.freeze - SINGLE_QUOTE = "'".freeze + DELETE = 'delete' + TR = 'tr' + BANG = '!' + SINGLE_QUOTE = "'" def_node_matcher :string_replacement?, <<-PATTERN (send _ {:gsub :gsub!} diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/times_map.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/times_map.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/times_map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/times_map.rb index 1f2c801ff9..1a04732947 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/times_map.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/times_map.rb @@ -19,8 +19,8 @@ module RuboCop # end class TimesMap < Cop MESSAGE = 'Use `Array.new(%s)` with a block ' \ - 'instead of `.times.%s`'.freeze - MESSAGE_ONLY_IF = 'only if `%s` is always 0 or more'.freeze + 'instead of `.times.%s`' + MESSAGE_ONLY_IF = 'only if `%s` is always 0 or more' def on_send(node) check(node) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/unfreeze_string.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/unfreeze_string.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/unfreeze_string.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/unfreeze_string.rb index 057e17bfb3..408fa959d4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/unfreeze_string.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/unfreeze_string.rb @@ -28,7 +28,7 @@ module RuboCop minimum_target_ruby_version 2.3 - MSG = 'Use unary plus to get an unfrozen string literal.'.freeze + MSG = 'Use unary plus to get an unfrozen string literal.' def_node_matcher :dup_string?, <<-PATTERN (send {str dstr} :dup) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/uri_default_parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/uri_default_parser.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/uri_default_parser.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/uri_default_parser.rb index 173c178b4c..a8aa3eb128 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance/uri_default_parser.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance/uri_default_parser.rb @@ -15,7 +15,7 @@ module RuboCop # class UriDefaultParser < Cop MSG = 'Use `%sURI::DEFAULT_PARSER` instead of ' \ - '`%sURI::Parser.new`.'.freeze + '`%sURI::Parser.new`.' def_node_matcher :uri_parser_new?, <<-PATTERN (send diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance_cops.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/cop/performance_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/cop/performance_cops.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance/version.rb similarity index 77% rename from Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance/version.rb index 24eca4639d..f376e2a7f3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.2.0/lib/rubocop/performance/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/rubocop-performance-1.3.0/lib/rubocop/performance/version.rb @@ -3,7 +3,7 @@ module RuboCop module Performance module Version - STRING = '1.2.0'.freeze + STRING = '1.3.0' end end end