From 3b0332ef6c3eaa3b2aefd9ae98b36c21e8c37db4 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 5 Nov 2024 16:04:24 +1100 Subject: [PATCH] DEV: use Sets for setting lists. (#29584) This makes membership checks more efficient --- lib/site_setting_extension.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/site_setting_extension.rb b/lib/site_setting_extension.rb index 567de4c65ed..e603dacfaf9 100644 --- a/lib/site_setting_extension.rb +++ b/lib/site_setting_extension.rb @@ -96,7 +96,7 @@ module SiteSettingExtension end def shadowed_settings - @shadowed_settings ||= [] + @shadowed_settings ||= Set.new end def requires_confirmation_settings @@ -124,7 +124,7 @@ module SiteSettingExtension end def secret_settings - @secret_settings ||= [] + @secret_settings ||= Set.new end def plugins