From 9ba1224867665844b117fa037e1465bb706b3685 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Sun, 9 Oct 2011 00:36:38 +0300 Subject: init commit --- lib/utils.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/utils.rb (limited to 'lib/utils.rb') diff --git a/lib/utils.rb b/lib/utils.rb new file mode 100644 index 00000000000..6e7460ed99a --- /dev/null +++ b/lib/utils.rb @@ -0,0 +1,8 @@ +module Utils + def self.binary?(string) + string.each_byte do |x| + x.nonzero? or return true + end + false + end +end -- cgit v1.2.1