diff options
author | Go MAEDA <maeda@farend.jp> | 2020-10-23 00:13:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-10-23 00:13:38 +0000 |
commit | fdba424d77ef3d835f89d37f3f04840fbc2c839f (patch) | |
tree | 2cc93e4773177357bb42223840ebb3f201f5ab7e /db/migrate/20120422150750_change_repositories_to_full_sti.rb | |
parent | 5280861cf309652d0ebf64658ef9cf2563ef8745 (diff) | |
download | redmine-fdba424d77ef3d835f89d37f3f04840fbc2c839f.tar.gz redmine-fdba424d77ef3d835f89d37f3f04840fbc2c839f.zip |
Use match? instead of =~ when MatchData is not used (#34150).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@20168 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20120422150750_change_repositories_to_full_sti.rb')
-rw-r--r-- | db/migrate/20120422150750_change_repositories_to_full_sti.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20120422150750_change_repositories_to_full_sti.rb b/db/migrate/20120422150750_change_repositories_to_full_sti.rb index 101ecbc12..f97d47cf1 100644 --- a/db/migrate/20120422150750_change_repositories_to_full_sti.rb +++ b/db/migrate/20120422150750_change_repositories_to_full_sti.rb @@ -3,7 +3,7 @@ class ChangeRepositoriesToFullSti < ActiveRecord::Migration[4.2] Repository.connection. select_rows("SELECT id, type FROM #{Repository.table_name}"). each do |repository_id, repository_type| - unless repository_type =~ /^Repository::/ + unless /^Repository::/.match?(repository_type) Repository.where(["id = ?", repository_id]). update_all(["type = ?", "Repository::#{repository_type}"]) end |