diff --git a/lib/rubocop/cop/rake/desc.rb b/lib/rubocop/cop/rake/desc.rb index 0263a18..88b84c4 100644 --- a/lib/rubocop/cop/rake/desc.rb +++ b/lib/rubocop/cop/rake/desc.rb @@ -74,7 +74,7 @@ def on_task(node) end private def can_insert_desc_to?(parent) - parent.begin_type? || parent.block_type? || parent.kwbegin_type? + parent.type?(:begin, :block, :kwbegin) end end end