diff options
author | Go MAEDA <maeda@farend.jp> | 2023-01-11 13:31:57 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-01-11 13:31:57 +0000 |
commit | 62a930cc65472133123f674c4bbdfcbd822cc731 (patch) | |
tree | da087327819b8fee07b5d046260d20078451c3ce /app/models/issue_relation.rb | |
parent | dbf8c1d921ce227d8fde88b62113a17fc8fe778d (diff) | |
download | redmine-62a930cc65472133123f674c4bbdfcbd822cc731.tar.gz redmine-62a930cc65472133123f674c4bbdfcbd822cc731.zip |
Fix RuboCop offense Performance/RedundantMatch (#38146).
git-svn-id: https://svn.redmine.org/redmine/trunk@22032 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_relation.rb')
-rw-r--r-- | app/models/issue_relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb index f2821340f..639c88e5e 100644 --- a/app/models/issue_relation.rb +++ b/app/models/issue_relation.rb @@ -91,7 +91,7 @@ class IssueRelation < ActiveRecord::Base attrs = attrs.deep_dup if issue_id = attrs.delete('issue_to_id') - if issue_id.to_s.strip.match(/\A#?(\d+)\z/) + if issue_id.to_s.strip =~ /\A#?(\d+)\z/ issue_id = $1.to_i self.issue_to = Issue.visible(user).find_by_id(issue_id) end |