File tree 5 files changed +18
-5
lines changed
5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 6.1.1] - 2023-03-21
10
+
11
+ ### Changed
12
+
13
+ - Fixed a bug where the call chain formatter was incorrectly looking at call messages.
14
+
9
15
## [ 6.1.0] - 2023-03-20
10
16
11
17
### Added
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- syntax_tree (6.1.0 )
4
+ syntax_tree (6.1.1 )
5
5
prettier_print (>= 1.2.0 )
6
6
7
7
GEM
Original file line number Diff line number Diff line change @@ -2824,7 +2824,7 @@ def format_chain(q, children)
2824
2824
if ( receiver = child . receiver ) . is_a? ( CallNode ) &&
2825
2825
( receiver . message != :call ) &&
2826
2826
( receiver . message . value == "where" ) &&
2827
- ( message . value == "not" )
2827
+ ( child . message != :call && child . message . value == "not" )
2828
2828
# This is very specialized behavior wherein we group
2829
2829
# .where.not calls together because it looks better. For more
2830
2830
# information, see
@@ -2848,8 +2848,8 @@ def format_chain(q, children)
2848
2848
# If the parent call node has a comment on the message then we need
2849
2849
# to print the operator trailing in order to keep it working.
2850
2850
last_child = children . last
2851
- if last_child . is_a? ( CallNode ) && last_child . message . comments . any? &&
2852
- last_child . operator
2851
+ if last_child . is_a? ( CallNode ) && last_child . message != :call &&
2852
+ last_child . message . comments . any? && last_child . operator
2853
2853
q . format ( CallOperatorFormatter . new ( last_child . operator ) )
2854
2854
skip_operator = true
2855
2855
else
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module SyntaxTree
4
- VERSION = "6.1.0 "
4
+ VERSION = "6.1.1 "
5
5
end
Original file line number Diff line number Diff line change 65
65
=begin
66
66
=end
67
67
to_s
68
+ %
69
+ fooooooooooooooooooooooooooooooooooo.barrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.where.not(:id).order(:id)
70
+ -
71
+ fooooooooooooooooooooooooooooooooooo
72
+ .barrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
73
+ .where.not(:id)
74
+ .order(:id)
You can’t perform that action at this time.
0 commit comments