brew vendor-gems: commit updates.
This commit is contained in:
		
							parent
							
								
									e069ed35b2
								
							
						
					
					
						commit
						f719733e3b
					
				@ -105,7 +105,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.4.2/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.44.1/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.0/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.15.2/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.16.0/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.18.1/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.6.11/lib")
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@ module RuboCop
 | 
			
		||||
        RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = %i[zip product].to_set.freeze
 | 
			
		||||
 | 
			
		||||
        # These methods ALWAYS return a new array
 | 
			
		||||
        # after they're called it's safe to mutate the the resulting array
 | 
			
		||||
        # after they're called it's safe to mutate the resulting array
 | 
			
		||||
        ALWAYS_RETURNS_NEW_ARRAY = %i[* + - collect compact drop
 | 
			
		||||
                                      drop_while flatten map reject
 | 
			
		||||
                                      reverse rotate select shuffle sort
 | 
			
		||||
@ -8,9 +8,12 @@ module RuboCop
 | 
			
		||||
      # `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.
 | 
			
		||||
      #   This cop is unsafe because is assumes the class implements the
 | 
			
		||||
      #   `Enumerable` interface, but can't reliably detect this. This creates
 | 
			
		||||
      #   known compatibility issues with `Hash`, `ActiveRecord` and other
 | 
			
		||||
      #   frameworks. `Hash` and `ActiveRecord` do not implement a `detect`
 | 
			
		||||
      #   method and `find` has its own meaning. Correcting `Hash` and
 | 
			
		||||
      #   `ActiveRecord` methods with this cop should be considered unsafe.
 | 
			
		||||
      #
 | 
			
		||||
      # @example
 | 
			
		||||
      #   # bad
 | 
			
		||||
@ -28,6 +28,7 @@ module RuboCop
 | 
			
		||||
      #   hash[:a] = 1
 | 
			
		||||
      #   hash[:b] = 2
 | 
			
		||||
      class RedundantMerge < Base
 | 
			
		||||
        include Alignment
 | 
			
		||||
        extend AutoCorrector
 | 
			
		||||
 | 
			
		||||
        AREF_ASGN = '%<receiver>s[%<key>s] = %<value>s'
 | 
			
		||||
@ -129,7 +130,7 @@ module RuboCop
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def rewrite_with_modifier(node, parent, new_source)
 | 
			
		||||
          indent = ' ' * indent_width
 | 
			
		||||
          indent = ' ' * configured_indentation_width
 | 
			
		||||
          padding = "\n#{indent + leading_spaces(node)}"
 | 
			
		||||
          new_source.gsub!(/\n/, padding)
 | 
			
		||||
 | 
			
		||||
@ -144,10 +145,6 @@ module RuboCop
 | 
			
		||||
          node.source_range.source_line[/\A\s*/]
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def indent_width
 | 
			
		||||
          @config.for_cop('Layout/IndentationWidth')['Width'] || 2
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def max_key_value_pairs
 | 
			
		||||
          Integer(cop_config['MaxKeyValuePairs'] || 2)
 | 
			
		||||
        end
 | 
			
		||||
@ -6,19 +6,19 @@ module RuboCop
 | 
			
		||||
      # Identifies unnecessary use of a regex where `String#include?` would suffice.
 | 
			
		||||
      #
 | 
			
		||||
      # @safety
 | 
			
		||||
      #   This cop's offenses are not safe to autocorrect if a receiver is nil.
 | 
			
		||||
      #   This cop's offenses are not safe to autocorrect if a receiver is nil or a Symbol.
 | 
			
		||||
      #
 | 
			
		||||
      # @example
 | 
			
		||||
      #   # bad
 | 
			
		||||
      #   'abc'.match?(/ab/)
 | 
			
		||||
      #   /ab/.match?('abc')
 | 
			
		||||
      #   'abc' =~ /ab/
 | 
			
		||||
      #   /ab/ =~ 'abc'
 | 
			
		||||
      #   'abc'.match(/ab/)
 | 
			
		||||
      #   /ab/.match('abc')
 | 
			
		||||
      #   str.match?(/ab/)
 | 
			
		||||
      #   /ab/.match?(str)
 | 
			
		||||
      #   str =~ /ab/
 | 
			
		||||
      #   /ab/ =~ str
 | 
			
		||||
      #   str.match(/ab/)
 | 
			
		||||
      #   /ab/.match(str)
 | 
			
		||||
      #
 | 
			
		||||
      #   # good
 | 
			
		||||
      #   'abc'.include?('ab')
 | 
			
		||||
      #   str.include?('ab')
 | 
			
		||||
      class StringInclude < Base
 | 
			
		||||
        extend AutoCorrector
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ module RuboCop
 | 
			
		||||
 | 
			
		||||
        def_node_matcher :redundant_regex?, <<~PATTERN
 | 
			
		||||
          {(send $!nil? {:match :=~ :!~ :match?} (regexp (str $#literal?) (regopt)))
 | 
			
		||||
           (send (regexp (str $#literal?) (regopt)) {:match :match?} $str)
 | 
			
		||||
           (send (regexp (str $#literal?) (regopt)) {:match :match?} $_)
 | 
			
		||||
           (match-with-lvasgn (regexp (str $#literal?) (regopt)) $_)}
 | 
			
		||||
        PATTERN
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ module RuboCop
 | 
			
		||||
  module Performance
 | 
			
		||||
    # This module holds the RuboCop Performance version information.
 | 
			
		||||
    module Version
 | 
			
		||||
      STRING = '1.15.2'
 | 
			
		||||
      STRING = '1.16.0'
 | 
			
		||||
 | 
			
		||||
      def self.document_version
 | 
			
		||||
        STRING.match('\d+\.\d+').to_s
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user