method

binary?

binary?(string)
private

No documentation available.

# File ext/psych/lib/psych/visitors/yaml_tree.rb, line 217
      def binary? string
        string.encoding == Encoding::ASCII_8BIT ||
          string.index("\x00") ||
          string.count("\x00-\x7F", "^ -~\t\r\n").fdiv(string.length) > 0.3
      end