lib/overcommit/configuration_validator.rb in overcommit-0.47.0 vs lib/overcommit/configuration_validator.rb in overcommit-0.48.0
- old
+ new
@@ -100,10 +100,10 @@
Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
hash.fetch(hook_type) { {} }.each_key do |hook_name|
next if hook_name == 'ALL'
- unless hook_name =~ /\A[A-Za-z0-9]+\z/
+ unless hook_name.match?(/\A[A-Za-z0-9]+\z/)
errors << "#{hook_type}::#{hook_name} has an invalid name " \
"#{hook_name}. It must contain only alphanumeric " \
'characters (no underscores or dashes, etc.)'
end
end