utils.rb 130 Bytes
Newer Older
gitlabhq's avatar
v1.0  
gitlabhq committed
1 2 3 4 5 6 7 8
module Utils
  def self.binary?(string) 
    string.each_byte do |x|
      x.nonzero? or return true 
    end
    false
  end
end