summaryrefslogtreecommitdiff
path: root/rubocop/cop
diff options
context:
space:
mode:
authorTakuya Noguchi <takninnovationresearch@gmail.com>2018-01-27 14:35:53 +0900
committerTakuya Noguchi <takninnovationresearch@gmail.com>2018-02-01 02:06:07 +0900
commit2b6307f6ad9d09156c42befe4babbfea40dad052 (patch)
tree2a05eb3e7a481ed803ea62a2d4e7667baff44375 /rubocop/cop
parent08e013431acb5238b4806260c4b9c304837097a3 (diff)
downloadgitlab-ce-2b6307f6ad9d09156c42befe4babbfea40dad052.tar.gz
Enable RuboCop Style/RegexpLiteral
Diffstat (limited to 'rubocop/cop')
-rw-r--r--rubocop/cop/migration/update_column_in_batches.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/migration/update_column_in_batches.rb b/rubocop/cop/migration/update_column_in_batches.rb
index db2b5564297..5461abc5ee0 100644
--- a/rubocop/cop/migration/update_column_in_batches.rb
+++ b/rubocop/cop/migration/update_column_in_batches.rb
@@ -29,7 +29,7 @@ module RuboCop
path = Pathname.new(source_name).relative_path_from(rails_root)
dirname = File.dirname(path)
.sub(%r{\Adb/(migrate|post_migrate)}, 'spec/migrations')
- filename = File.basename(source_name, '.rb').sub(%r{\A\d+_}, '')
+ filename = File.basename(source_name, '.rb').sub(/\A\d+_/, '')
File.join(dirname, "#{filename}_spec.rb")
end