From db7777eeb5e69868593522bc167541dc3a1bc437 Mon Sep 17 00:00:00 2001 From: Ryan Tomayko Date: Fri, 16 Oct 2009 03:16:14 -0700 Subject: [PATCH] remove non thread-safe autoload warning when under a single thread --- lib/tilt.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tilt.rb b/lib/tilt.rb index 89a1a9e3..9a453b78 100644 --- a/lib/tilt.rb +++ b/lib/tilt.rb @@ -133,8 +133,10 @@ def local_assignment_code(locals) end def require_template_library(name) - warn "WARN: loading '#{name}' library in a non thread-safe way; " + - "explicit require '#{name}' suggested." + if Thread.list.size > 1 + warn "WARN: tilt autoloading '#{name}' in a non thread-safe way; " + + "explicit require '#{name}' suggested." + end require name end end