1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

RuboCop: fix Style/RedundantSort in app/models/import.rb (#34718).

git-svn-id: http://svn.redmine.org/redmine/trunk@21353 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2022-01-07 01:49:21 +00:00
parent ec0ce00b95
commit e00f28e82e

View File

@ -70,7 +70,7 @@ class Import < ActiveRecord::Base
begin
content = File.read(filepath, 256)
separator = [',', ';'].sort_by {|sep| content.count(sep)}.last
separator = [',', ';'].max_by {|sep| content.count(sep)}
guessed_encoding = Redmine::CodesetUtil.guess_encoding(file_content)
encoding =