]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Style/MapToHash (#39111).
authorGo MAEDA <maeda@farend.jp>
Fri, 26 Jan 2024 08:29:59 +0000 (08:29 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 26 Jan 2024 08:29:59 +0000 (08:29 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22644 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/asset_path.rb

index b05a5f6f8b4aab10c376cfc06ef0aef6d87bdfd6..b115fe187160b2fc66315ad50cd75c57b9b2d34c 100644 (file)
@@ -171,7 +171,7 @@ module Redmine
     def cache_sweeper
       @cache_sweeper ||= begin
         exts_to_watch  = Mime::EXTENSION_LOOKUP.map(&:first)
-        files_to_watch = Array(all_paths).collect { |dir| [dir.to_s, exts_to_watch] }.to_h
+        files_to_watch = Array(all_paths).to_h { |dir| [dir.to_s, exts_to_watch] }
         Rails.application.config.file_watcher.new([], files_to_watch) do
           clear_cache
         end