summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-01-07 01:49:21 +0000
committerGo MAEDA <maeda@farend.jp>2022-01-07 01:49:21 +0000
commite00f28e82e50000e3e6c116c5a218d3f0676f5a7 (patch)
tree5e0d41d8c43329c0bb24dc421985536d9b3239da /app
parentec0ce00b95c4d08c2c7c9bae79d16f84829349fb (diff)
downloadredmine-e00f28e82e50000e3e6c116c5a218d3f0676f5a7.tar.gz
redmine-e00f28e82e50000e3e6c116c5a218d3f0676f5a7.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/import.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/import.rb b/app/models/import.rb
index ffa69d22e..e048867c8 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -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 =