diff --git a/rake.d/helpers.rb b/rake.d/helpers.rb index 05b6282e7..7609f7559 100644 --- a/rake.d/helpers.rb +++ b/rake.d/helpers.rb @@ -1,9 +1,11 @@ -$message_mutex = Mutex.new -def puts(message) - $message_mutex.lock - $stdout.puts message - $stdout.flush - $message_mutex.unlock +if defined? Mutex + $message_mutex = Mutex.new + def puts(message) + $message_mutex.lock + $stdout.puts message + $stdout.flush + $message_mutex.unlock + end end def error(message)