From 84db64b39dd829023cdb199ad48759e98186f7c7 Mon Sep 17 00:00:00 2001 From: Tim Finley Date: Tue, 30 Jul 2013 12:48:36 -0400 Subject: [PATCH] Requested PR fixes --- lib/guard.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/guard.rb b/lib/guard.rb index a1d98fd2c..eb55c697d 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -50,13 +50,11 @@ def setup(options = {}) @runner = ::Guard::Runner.new @scope = { :plugins => [], :groups => [] } - @watchdirs = [ Dir.pwd ] + @watchdirs = [Dir.pwd] if options[:watchdir] # Ensure we have an array - options[:watchdir] = [ options[:watchdir] ] unless options[:watchdir].is_a? Enumerable - - @watchdirs = options[:watchdir].map { |dir| File.expand_path dir } + @watchdirs = Array(options[:watchdir]).map { |dir| File.expand_path dir } end ::Guard::UI.clear(:force => true)