summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-08-25 08:44:33 +0000
committerGo MAEDA <maeda@farend.jp>2024-08-25 08:44:33 +0000
commitfdd90bab2b02d6fdd08a860808560eb2cf382af6 (patch)
treebcf26941dbc0fc8a0a6542f35d9fd5a92e1b5aa1 /app/helpers
parentfd83e97b135ee8affedf57f18952bce30271fc2e (diff)
downloadredmine-fdd90bab2b02d6fdd08a860808560eb2cf382af6.tar.gz
redmine-fdd90bab2b02d6fdd08a860808560eb2cf382af6.zip
Fix RuboCop offenses Style/NegatedIf and Style/NegatedWhile (#39887, #7770).
git-svn-id: https://svn.redmine.org/redmine/trunk@22987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/helpers/repositories_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 369291a3c..ca8e1c266 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -916,7 +916,7 @@ module ApplicationHelper
s = StringScanner.new(text)
tags = []
parsed = +''
- while !s.eos?
+ until s.eos?
s.scan(/(.*?)(<(\/)?(pre|code)(.*?)>|\z)/im)
text, full_tag, closing, tag = s[1], s[2], s[3], s[4]
if tags.empty?
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index abc994495..7a6978979 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -56,7 +56,7 @@ module RepositoriesHelper
case change.action
when 'A'
# Detects moved/copied files
- if !change.from_path.blank?
+ if change.from_path.present?
change.action =
@changeset.filechanges.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
end