lib/rubocop/cop/rake/duplicate_task.rb in rubocop-rake-0.5.1 vs lib/rubocop/cop/rake/duplicate_task.rb in rubocop-rake-0.6.0

- old
+ new

@@ -21,11 +21,11 @@ # task :foo do # p 'foo 1' # p 'foo 2' # end # - class DuplicateTask < Cop + class DuplicateTask < Base include Helper::OnTask MSG = 'Task `%<task>s` is defined at both %<previous>s and %<current>s.' def initialize(*) @@ -52,10 +52,10 @@ def namespaces(node) ns = [] node.each_ancestor(:block) do |block_node| send_node = block_node.send_node - next unless send_node.method_name == :namespace + next unless send_node.method?(:namespace) name = Helper::TaskName.task_name(send_node) ns << name end