blob: 39f48d74ebfcf812b5be3072abe8f4659c8057ae (
plain)
1
2
3
4
5
6
7
8
|
if RUBY_VERSION.to_f == 1.9
class String
# @see syck/lib/syck/rubytypes.rb
def is_binary_data?
self.count("\x00-\x7F", "^ -~\t\r\n").fdiv(self.size) > 0.3 || self.index("\x00") unless self.empty?
end
end
end
|