Fixed watch block without params on 1.9.2

This commit is contained in:
Thibaud Guillaume-Gentil 2010-10-07 22:37:13 +02:00
parent 0e4d75eda2
commit bc5cc10d42

View File

@ -12,11 +12,10 @@ module Guard
if matches = file.match(watcher.pattern)
if watcher.action
begin
case watcher.action.arity
when -1
result = watcher.action.call
when 1
if watcher.action.arity == 1
result = watcher.action.call(matches)
else
result = watcher.action.call
end
rescue
UI.info "Problem with watch action"