From 8d27fff74dc24745bbaf2a514719440bf54f4b00 Mon Sep 17 00:00:00 2001 From: Scott Bronson Date: Thu, 14 Jul 2011 11:42:26 -0700 Subject: [PATCH] Fix undefined method `empty?' for nil:NilClass error --- lib/guard/dsl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/dsl.rb b/lib/guard/dsl.rb index ebff95d..1c3a461 100644 --- a/lib/guard/dsl.rb +++ b/lib/guard/dsl.rb @@ -9,7 +9,7 @@ module Guard @@options = options.dup instance_eval_guardfile(fetch_guardfile_contents) - UI.error "No guards found in Guardfile, please add at least one." if ::Guard.guards.empty? + UI.error "No guards found in Guardfile, please add at least one." if ::Guard.guards.nil? || ::Guard.guards.empty? end def revaluate_guardfile