remove is_binary_data? from String (#25563)

git-svn-id: http://svn.redmine.org/redmine/trunk@16644 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2017-06-10 04:29:15 +00:00
parent 7f4767418b
commit 06babbec7e
4 changed files with 10 additions and 6 deletions

View File

@@ -4,8 +4,4 @@ require File.dirname(__FILE__) + '/string/inflections'
class String #:nodoc:
include Redmine::CoreExtensions::String::Conversions
include Redmine::CoreExtensions::String::Inflections
def is_binary_data?
( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty?
end
end