lib/rubocop/cop/style/method_def_parentheses.rb in rubocop-0.50.0 vs lib/rubocop/cop/style/method_def_parentheses.rb in rubocop-0.51.0
- old
+ new
@@ -57,16 +57,18 @@
def arguments_without_parentheses?(node)
node.arguments? && !parentheses?(node.arguments)
end
def missing_parentheses(node)
- add_offense(node, node.arguments.source_range, MSG_MISSING) do
+ location = node.arguments.source_range
+
+ add_offense(node, location: location, message: MSG_MISSING) do
unexpected_style_detected(:require_no_parentheses)
end
end
def unwanted_parentheses(args)
- add_offense(args, :expression, MSG_PRESENT) do
+ add_offense(args, message: MSG_PRESENT) do
unexpected_style_detected(:require_parentheses)
end
end
end
end