APIdock / Ruby
/
Browse About
method

is_binary_data?

v1_8_7_330 - Show latest stable - Class: String
is_binary_data?()
public

No documentation available.

# File lib/yaml/rubytypes.rb, line 145
    def is_binary_data?
        ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty?
    end

Related methods

  • Instance methods
  • %
  • *
  • +
  • <<
  • <=>
  • ==
  • =~
  • []
  • []=
  • block_scanf
  • bytes
  • bytesize
  • capitalize
  • capitalize!
  • casecmp
  • center
  • chars
  • chomp
  • chomp!
  • chop
  • chop
  • chop!
  • chop!
  • concat
  • count
  • crypt
  • delete
  • delete
  • delete!
  • delete!
  • downcase
  • downcase!
  • dump
  • each
  • each_byte
  • each_char
  • each_char
  • each_line
  • empty?
  • end_regexp
  • end_with?
  • eql?
  • gsub
  • gsub!
  • hash
  • hex
  • include?
  • index
  • initialize_copy
  • insert
  • inspect
  • intern
  • is_binary_data?
  • is_complex_yaml?
  • iseuc
  • issjis
  • isutf8
  • jcount
  • jlength
  • jsize
  • kconv
  • length
  • lines
  • ljust
  • lstrip
  • lstrip!
  • match
  • mbchar?
  • next
  • next!
  • oct
  • partition
  • replace
  • reverse
  • reverse!
  • rindex
  • rjust
  • rpartition
  • rstrip
  • rstrip!
  • scan
  • scanf
  • shellescape
  • shellsplit
  • size
  • slice
  • slice!
  • split
  • squeeze
  • squeeze
  • squeeze!
  • squeeze!
  • start_with?
  • strip
  • strip!
  • sub
  • sub!
  • succ
  • succ
  • succ!
  • succ!
  • sum
  • swapcase
  • swapcase!
  • to_f
  • to_i
  • to_s
  • to_str
  • to_sym
  • to_yaml
  • toeuc
  • tojis
  • tosjis
  • toutf16
  • toutf8
  • tr
  • tr
  • tr!
  • tr!
  • tr_s
  • tr_s
  • tr_s!
  • tr_s!
  • unpack
  • upcase
  • upcase!
  • upto
  • Class methods
  • new
  • yaml_new
  • Private methods
  • private_expand_ch
  • private_regex_quote
  • privateexpand_ch_hash
  • privateoriginal_succ
  • privateoriginal_succ!
APIdock API Documentation Browser

© 2026 APIdock