From c12b85e7a94a04cb391b13ba2f5ae6b69315cef7 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 7 Jan 2025 06:24:52 -0500 Subject: [PATCH] Fix Style/MultipleComparison (#33313) Co-authored-by: Matt Jankowski --- .rubocop/style.yml | 3 --- app/lib/activitypub/tag_manager.rb | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.rubocop/style.yml b/.rubocop/style.yml index 7dd4299c3e..df1da2ba36 100644 --- a/.rubocop/style.yml +++ b/.rubocop/style.yml @@ -29,9 +29,6 @@ Style/IfUnlessModifier: Style/KeywordArgumentsMerging: Enabled: false -Style/MultipleComparison: - Enabled: false - Style/NumericLiterals: AllowedPatterns: - \d{4}_\d{2}_\d{2}_\d{6} diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb index 23b44be372..a489928407 100644 --- a/app/lib/activitypub/tag_manager.rb +++ b/app/lib/activitypub/tag_manager.rb @@ -13,7 +13,7 @@ class ActivityPub::TagManager }.freeze def public_collection?(uri) - uri == COLLECTIONS[:public] || uri == 'as:Public' || uri == 'Public' + uri == COLLECTIONS[:public] || %w(as:Public Public).include?(uri) end def url_for(target)