Corrected run_on defaulting line to work correctly if a symbol is passed in

This commit is contained in:
Wes Gamble 2011-07-14 20:57:14 -05:00
parent 13287fb59b
commit 96ba8c7b31

View File

@ -38,7 +38,7 @@ module Guard
def run_for? command
run_on = @options[:run_on]
run_on = [:start, :change] if not run_on or run_on.empty?
run_on = [:start, :change] if not run_on or run_on.to_s.empty?
run_on = [run_on] unless run_on.respond_to?(:include?)
run_on.include?(command)
end