1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

revises a regexp

The exclamation mark is not a metacharacter.
This commit is contained in:
Xavier Noria 2016-07-22 23:17:39 +02:00
parent cfc91c31aa
commit 92c60f87a6

View file

@ -314,7 +314,7 @@ module ActiveSupport
raise if e.name && !(camel_cased_word.to_s.split("::").include?(e.name.to_s) ||
e.name.to_s == camel_cased_word.to_s)
rescue ArgumentError => e
raise unless /not missing constant #{const_regexp(camel_cased_word)}\!$/.match?(e.message)
raise unless /not missing constant #{const_regexp(camel_cased_word)}!$/.match?(e.message)
end
# Returns the suffix that should be added to a number to denote the position