gitlabhq/lib/utils.rb
Dmitriy Zaporozhets d378468794 v1.0
2011-10-13 04:00:00 +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