File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -299,9 +299,7 @@ def debug_info
299
299
#
300
300
# @return [String] source code.
301
301
def to_source
302
- if self . loc . expression
303
- self . loc . expression . source
304
- end
302
+ self . loc . expression &.source
305
303
end
306
304
307
305
# Get the indent of current node.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class Rewriter::IfExistCondition < Rewriter::Condition
7
7
def match?
8
8
match = false
9
9
@instance . current_node . recursive_children do |child_node |
10
- match = match || ( child_node && child_node . match? ( @rules ) )
10
+ match = match || ( child_node & .match? ( @rules ) )
11
11
end
12
12
match
13
13
end
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class Rewriter::UnlessExistCondition < Rewriter::Condition
7
7
def match?
8
8
match = false
9
9
@instance . current_node . recursive_children do |child_node |
10
- match = match || ( child_node && child_node . match? ( @rules ) )
10
+ match = match || ( child_node & .match? ( @rules ) )
11
11
end
12
12
!match
13
13
end
You can’t perform that action at this time.
0 commit comments