lib/rubocop/cop/layout/multiline_block_layout.rb in rubocop-1.22.1 vs lib/rubocop/cop/layout/multiline_block_layout.rb in rubocop-1.22.2

- old
+ new

@@ -61,11 +61,11 @@ unless args_on_beginning_line?(node) || line_break_necessary_in_args?(node) add_offense_for_expression(node, node.arguments, ARG_MSG) end - return unless node.body && node.loc.begin.line == node.body.first_line + return unless node.body && same_line?(node.loc.begin, node.body) add_offense_for_expression(node, node.body, MSG) end private @@ -108,10 +108,10 @@ return unless node.body expr_before_body ||= node.loc.begin - return unless expr_before_body.line == node.body.first_line + return unless same_line?(expr_before_body, node.body) autocorrect_body(corrector, node, node.body) end def autocorrect_arguments(corrector, node)