From 18275bd02896a69efcc9980f08afd11523c93111 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 24 Mar 2023 23:17:35 +0000 Subject: [PATCH] Fix RuboCop offense Rails/Presence in lib/redmine/scm/adapters/abstract_adapter.rb (#36919). git-svn-id: https://svn.redmine.org/redmine/trunk@22150 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/abstract_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 087f62e4c..88a62fd6d 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -72,9 +72,9 @@ module Redmine def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil) @url = url - @login = login if login && !login.empty? + @login = login if login.present? @password = (password || "") if @login - @root_url = root_url.blank? ? retrieve_root_url : root_url + @root_url = root_url.presence || retrieve_root_url @path_encoding = path_encoding.presence || 'UTF-8' end -- 2.39.5