From 2eab1aca71b1191496e1ad9e42255d356f0be21f Mon Sep 17 00:00:00 2001 From: John Ledbetter Date: Sun, 13 Jul 2025 16:29:52 -0400 Subject: [PATCH] restore_filters: remove instance variable as default argument --- lib/systemd/journal/filterable.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/systemd/journal/filterable.rb b/lib/systemd/journal/filterable.rb index b164609..189417c 100644 --- a/lib/systemd/journal/filterable.rb +++ b/lib/systemd/journal/filterable.rb @@ -108,7 +108,11 @@ def clear_filters private - def restore_filters(conditions = @reopen_filter_conditions) + # Restore filters from a previously saved set of conditions. + # Note that this cannot be a reference to the existing @reopen_filter_conditions + # as they will be cleared when this method is called. + # # @param [Array] conditions an array of conditions to restore. + def restore_filters(conditions) clear_filters conditions.each do |condition|