From 732372c928744a4da441691f84bc137969ba4eff Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 22 May 2020 14:31:57 -0400 Subject: [PATCH] Reduce allocations in action_view cache expiry --- actionview/lib/action_view/cache_expiry.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actionview/lib/action_view/cache_expiry.rb b/actionview/lib/action_view/cache_expiry.rb index 27690561b7..086f2dcb3a 100644 --- a/actionview/lib/action_view/cache_expiry.rb +++ b/actionview/lib/action_view/cache_expiry.rb @@ -42,8 +42,7 @@ module ActionView private def dirs_to_watch - fs_paths = all_view_paths.grep(FileSystemResolver) - fs_paths.map(&:path).sort.uniq + all_view_paths.grep(FileSystemResolver).map!(&:path).tap(&:uniq!).sort! end def all_view_paths