Skip to content

Commit ce2022b

Browse files
authored
Merge pull request #103 from xinminlabs/awesomecode-lint-ruby-style-selfassignment-47841
Auto corrected by following Lint Ruby Style/SelfAssignment
2 parents 31b0a2b + f5e4bf6 commit ce2022b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/synvert/core/rewriter/condition/if_exist_condition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Rewriter::IfExistCondition < Rewriter::Condition
77
def match?
88
match = false
99
@instance.current_node.recursive_children do |child_node|
10-
match = match || (child_node&.match?(@rules))
10+
match ||= (child_node&.match?(@rules))
1111
end
1212
match
1313
end

lib/synvert/core/rewriter/condition/unless_exist_condition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Rewriter::UnlessExistCondition < Rewriter::Condition
77
def match?
88
match = false
99
@instance.current_node.recursive_children do |child_node|
10-
match = match || (child_node&.match?(@rules))
10+
match ||= (child_node&.match?(@rules))
1111
end
1212
!match
1313
end

0 commit comments

Comments
 (0)