Index: lib/redmine/scm/adapters/git_adapter.rb IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- lib/redmine/scm/adapters/git_adapter.rb (date 1491468410000) +++ lib/redmine/scm/adapters/git_adapter.rb (revision ) @@ -338,7 +338,7 @@ content = nil git_cmd(cmd_args) { |io| io.binmode; content = io.read } # git annotates binary files - return nil if content.is_binary_data? + return nil if content.binary_data? identifier = '' # git shows commit author on the first occurrence only authors_by_commit = {} Index: app/controllers/repositories_controller.rb IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- app/controllers/repositories_controller.rb (date 1491468410000) +++ app/controllers/repositories_controller.rb (revision ) @@ -200,7 +200,7 @@ return true if Redmine::MimeType.is_type?('text', path) # Ruby 1.8.6 has a bug of integer divisions. # http://apidock.com/ruby/v1_8_6_287/String/is_binary_data%3F - return false if ent.is_binary_data? + return false if ent.binary_data? true end private :is_entry_text_data? Index: lib/redmine/core_ext/string.rb IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- lib/redmine/core_ext/string.rb (date 1491468410000) +++ lib/redmine/core_ext/string.rb (revision ) @@ -5,7 +5,7 @@ include Redmine::CoreExtensions::String::Conversions include Redmine::CoreExtensions::String::Inflections - def is_binary_data? + def binary_data? ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? end end