File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,16 +46,18 @@ def visit_call_node(node)
4646 call_operator_loc = node . call_operator_loc
4747 message_loc = node . message_loc
4848 if receiver_loc && call_operator_loc && message_loc
49- # foo
50- # .bar
49+ # dot-leading (dot on the next line)
50+ # foo # line 1 — consecutive
51+ # .bar # line 2
5152 if receiver_loc . end_line != call_operator_loc . start_line && call_operator_loc . start_line == message_loc . start_line
5253 ( receiver_loc . end_line ..call_operator_loc . start_line - 1 ) . each do |line |
5354 @consecutive_lines [ line ] = true
5455 end
5556 end
5657
57- # foo.
58- # bar
58+ # dot-trailing (dot on the same line as the receiver)
59+ # foo. # line 1 — consecutive
60+ # bar # line 2
5961 if receiver_loc . end_line == call_operator_loc . start_line && call_operator_loc . start_line != message_loc . start_line
6062 ( call_operator_loc . start_line ..message_loc . start_line - 1 ) . each do |line |
6163 @consecutive_lines [ line ] = true
You can’t perform that action at this time.
0 commit comments