lib/rubocop/cop/layout/class_structure.rb in rubocop-1.46.0 vs lib/rubocop/cop/layout/class_structure.rb in rubocop-1.47.0

- old
+ new

@@ -283,13 +283,15 @@ node.arguments.any? { |arg| (arg.sym_type? || arg.str_type?) && arg.value == name } end def end_position_for(node) - heredoc = find_heredoc(node) - return heredoc.location.heredoc_end.end_pos + 1 if heredoc + if node.casgn_type? + heredoc = find_heredoc(node) + return heredoc.location.heredoc_end.end_pos + 1 if heredoc + end - end_line = buffer.line_for_position(node.loc.expression.end_pos) + end_line = buffer.line_for_position(node.source_range.end_pos) buffer.line_range(end_line).end_pos end def begin_pos_with_comment(node) first_comment = nil