1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Remove unnecessary rubocop:disable directive for Style/EmptyLiteral (#39887).

RuboCop’s Style/EmptyLiteral false positive for `Hash.new([])` was resolved in RuboCop 1.66.1. This commit updates the RuboCop version to 1.66.1 and removes the now-unnecessary `rubocop:disable` directives.


git-svn-id: https://svn.redmine.org/redmine/trunk@23013 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2024-09-05 00:49:54 +00:00
parent 7841e933d4
commit b7120cfe3a
2 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ group :test do
gem "capybara", ">= 3.39"
gem 'selenium-webdriver', '>= 4.11.0'
# RuboCop
gem 'rubocop', '~> 1.66.0', require: false
gem 'rubocop', '~> 1.66.1', require: false
gem 'rubocop-performance', '~> 1.21.0', require: false
gem 'rubocop-rails', '~> 2.26.0', require: false
end

View File

@ -643,7 +643,7 @@ class User < Principal
def projects_by_role
return @projects_by_role if @projects_by_role
result = Hash.new([]) # rubocop:disable Style/EmptyLiteral
result = Hash.new([])
project_ids_by_role.each do |role, ids|
result[role] = Project.where(:id => ids).to_a
end
@ -676,7 +676,7 @@ class User < Principal
hash[role_id] << project_id
end
result = Hash.new([]) # rubocop:disable Style/EmptyLiteral
result = Hash.new([])
if hash.present?
roles = Role.where(:id => hash.keys).to_a
hash.each do |role_id, proj_ids|