gitlabhq/lib/utils.rb
2011-10-09 00:36:38 +03:00

9 lines
130 B
Ruby

module Utils
def self.binary?(string)
string.each_byte do |x|
x.nonzero? or return true
end
false
end
end