gitlabhq/lib/utils.rb

9 lines
130 B
Ruby
Raw Normal View History

2011-10-08 23:36:38 +02:00
module Utils
def self.binary?(string)
string.each_byte do |x|
x.nonzero? or return true
end
false
end
end