lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb in rubocop-ast-1.7.0 vs lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb in rubocop-ast-1.8.0
- old
+ new
@@ -345,10 +345,10 @@
end
def compile_loop_advance(to = '+=1')
# The `#{@cur_child_var} ||` is just to avoid unused variable warning
"(#{@cur_child_var} = #{@seq_var}.children[#{@cur_index_var} #{to}]; " \
- "#{@cur_child_var} || true)"
+ "#{@cur_child_var} || true)"
end
def compile_loop(term)
<<~RUBY
(#{compile_max_matched}).times do