Mercurial > hg > soundsoftware-site
comparison lib/redmine/core_ext/string.rb @ 1115:433d4f72a19b redmine-2.2
Update to Redmine SVN revision 11137 on 2.2-stable branch
author | Chris Cannam |
---|---|
date | Mon, 07 Jan 2013 12:01:42 +0000 |
parents | 513646585e45 |
children |
comparison
equal
deleted
inserted
replaced
929:5f33065ddc4b | 1115:433d4f72a19b |
---|---|
2 require File.dirname(__FILE__) + '/string/inflections' | 2 require File.dirname(__FILE__) + '/string/inflections' |
3 | 3 |
4 class String #:nodoc: | 4 class String #:nodoc: |
5 include Redmine::CoreExtensions::String::Conversions | 5 include Redmine::CoreExtensions::String::Conversions |
6 include Redmine::CoreExtensions::String::Inflections | 6 include Redmine::CoreExtensions::String::Inflections |
7 | |
8 def is_binary_data? | |
9 ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? | |
10 end | |
7 end | 11 end |