brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2023-02-06 18:07:37 +00:00
parent e069ed35b2
commit f719733e3b
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
59 changed files with 20 additions and 20 deletions

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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