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

lib/redmine/asset_path.rb

index ca372713af2a8f6875f239621a7eb072d1715b43..d8a65b8adbec8c160d2f14463db32210a14bfe4b 100644 (file)
@@ -82,13 +82,13 @@ module Redmine
       def parent_path?(path, other)
         return nil if other == path
 
-        path.ascend.any?{|v| v == other}
+        path.ascend.any?(other)
       end
 
       def child_path?(path, other)
         return nil if path == other
 
-        other.ascend.any?{|v| v == path}
+        other.ascend.any?(path)
       end
 
       def update(transition_map)