Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump RuboCop Performance to 1.10 #9550

Merged
merged 1 commit into from
Feb 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ else
end
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.7'
gem 'rubocop-performance', '~> 1.9.0'
gem 'rubocop-performance', '~> 1.10.0'
gem 'rubocop-rspec', '~> 2.2.0'
# Workaround for cc-test-reporter with SimpleCov 0.18.
# Stop upgrading SimpleCov until the following issue will be resolved.
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/mixin/preferred_delimiters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(type, config, preferred_delimiters)
end

def delimiters
preferred_delimiters[type].split(//)
preferred_delimiters[type].split('')
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/style/command_literal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def backtick_literal?(node)
end

def preferred_delimiter
(command_delimiter || default_delimiter).split(//)
(command_delimiter || default_delimiter).split('')
end

def command_delimiter
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/style/regexp_literal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def slash_literal?(node)

def preferred_delimiters
config.for_cop('Style/PercentLiteralDelimiters') \
['PreferredDelimiters']['%r'].split(//)
['PreferredDelimiters']['%r'].split('')
end

def correct_delimiters(node, corrector)
Expand Down
2 changes: 1 addition & 1 deletion spec/support/alignment_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
else
{ 'Enabled' => false }
end
annotated_source.split(/\n\n/).each do |chunk|
annotated_source.split("\n\n").each do |chunk|
chunk << "\n" unless chunk.end_with?("\n")
source = chunk.lines.reject { |line| /^ *\^/.match?(line) }.join
name = source.gsub(/\n(?=[a-z ])/, ' <newline> ').gsub(/\s+/, ' ')
Expand Down