brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2021-08-18 18:09:20 +00:00
parent c74497ee3a
commit 2053145a16
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
57 changed files with 20 additions and 5 deletions

View File

@ -82,7 +82,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.10.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.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.19.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib"

View File

@ -66,7 +66,7 @@ module RuboCop
chained_method = compact_node.parent
compact_method_range = compact_node.loc.selector
if compact_node.multiline? && chained_method&.loc.respond_to?(:selector) &&
if compact_node.multiline? && chained_method&.loc.respond_to?(:selector) && chained_method.dot? &&
!invoke_method_after_map_compact_on_same_line?(compact_node, chained_method)
compact_method_range = range_by_whole_lines(compact_method_range, include_final_newline: true)
else

View File

@ -74,12 +74,27 @@ module RuboCop
def new_argument(block_argument, block_body)
if block_argument.source == block_body.receiver.source
block_body.first_argument.source
rhs = block_body.first_argument
return if use_block_argument_in_method_argument_of_operand?(block_argument, rhs)
rhs.source
elsif block_argument.source == block_body.first_argument.source
block_body.receiver.source
lhs = block_body.receiver
return if use_block_argument_in_method_argument_of_operand?(block_argument, lhs)
lhs.source
end
end
def use_block_argument_in_method_argument_of_operand?(block_argument, operand)
return false unless operand.send_type?
arguments = operand.arguments
arguments.inject(arguments.map(&:source)) do |operand_sources, argument|
operand_sources + argument.each_descendant(:lvar).map(&:source)
end.any?(block_argument.source)
end
def offense_range(node)
node.send_node.loc.selector.join(node.source_range.end)
end

View File

@ -4,7 +4,7 @@ module RuboCop
module Performance
# This module holds the RuboCop Performance version information.
module Version
STRING = '1.11.4'
STRING = '1.11.5'
def self.document_version
STRING.match('\d+\.\d+').to_s