lib/reek/configuration/configuration_file_finder.rb in reek-6.1.2 vs lib/reek/configuration/configuration_file_finder.rb in reek-6.1.3
- old
+ new
@@ -85,10 +85,11 @@
#
# @return [File|nil]
#
# @quality :reek:FeatureEnvy
def find_in_dir(dir)
- dir.children.detect { |item| item.file? && item.basename.to_s == DEFAULT_FILE_NAME }
+ file = dir + DEFAULT_FILE_NAME
+ file if file.file?
end
end
end
end
end