mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user