Browse Source

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
tags/5.0.0
Go MAEDA 2 years ago
parent
commit
e00f28e82e
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/models/import.rb

+ 1
- 1
app/models/import.rb 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 =

Loading…
Cancel
Save