Permalink
Browse files

Ticket #193 - Don't check if task already defined

It's done in task method(line 95) and not needed in alias_task
  • Loading branch information...
1 parent 3022a46 commit ce7037920cbdd60358c4c8e2d8320bf350fd6e18 @rgo rgo committed Jul 12, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/capistrano/configuration/namespaces.rb
@@ -104,13 +104,10 @@ def task(name, options={}, &block)
end
def define_task(task)
- task_already_defined = tasks.key?(task.name)
tasks[task.name] = task
- if !task_already_defined
- metaclass = class << self; self; end
- metaclass.send(:define_method, task.name) { execute_task(tasks[task.name]) }
- end
+ metaclass = class << self; self; end
+ metaclass.send(:define_method, task.name) { execute_task(tasks[task.name]) }
end
# Find the task with the given name, where name is the fully-qualified

0 comments on commit ce70379

Please sign in to comment.