diff options
author | Go MAEDA <maeda@farend.jp> | 2024-01-08 01:04:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-01-08 01:04:37 +0000 |
commit | 52a55f407b74815c13675f4176570b8a952d7b75 (patch) | |
tree | 0ec4550df5a3e31b70432a99b29228fb05b130e0 /test/functional/custom_fields_controller_test.rb | |
parent | 4d3fc7f89ec7f3d121b64ccb7d7b45dcf5827363 (diff) | |
download | redmine-52a55f407b74815c13675f4176570b8a952d7b75.tar.gz redmine-52a55f407b74815c13675f4176570b8a952d7b75.zip |
Replace String#sub with delete_prefix / delete_suffix (#40008).
Patch by Go MAEDA (@maeda).
git-svn-id: https://svn.redmine.org/redmine/trunk@22596 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/custom_fields_controller_test.rb')
-rw-r--r-- | test/functional/custom_fields_controller_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index b6e4ed6ce..bc13e64b5 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -596,7 +596,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest def custom_field_classes files = Dir.glob(File.join(Rails.root, 'app/models/*_custom_field.rb')). - map {|f| File.basename(f).sub(/\.rb$/, '')} + map {|f| File.basename(f).delete_suffix('.rb')} classes = files.map {|x| x.classify.constantize} assert classes.size > 0 classes |