From c069ea3a2440f4cb0641abd4e3ddb6be5bd6bdb2 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 20 Aug 2024 23:40:58 +0000 Subject: Use Array#intersect? introduced in Ruby 3.1 (#38585). git-svn-id: https://svn.redmine.org/redmine/trunk@22972 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/initializers/10-patches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 716330641..04081c333 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -96,7 +96,7 @@ end module ActionView LookupContext.prepend(Module.new do def formats=(values) - if (Array(values) & [:xml, :json]).any? + if Array(values).intersect?([:xml, :json]) values << :api end super -- cgit v1.2.3