lib/rubocop/lsp.rb in rubocop-1.63.4 vs lib/rubocop/lsp.rb in rubocop-1.64.1

- old
+ new

@@ -20,10 +20,17 @@ end # Disable LSP. # # @return [void] - def disable - @enabled = false + def disable(&block) + if block + original = @enabled + @enabled = false + yield + @enabled = original + else + @enabled = false + end end end end