diff options
author | Xavier Noria <fxn@hashref.com> | 2016-07-22 23:17:39 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-07-22 23:20:25 +0200 |
commit | 92c60f87a6cbbe8c556399f415772c2dd2d48981 (patch) | |
tree | a2db22d5bc14f250e088079fa36210b52470dbbf /activesupport | |
parent | cfc91c31aa989826e992be29b6d5b181f654f853 (diff) | |
download | rails-92c60f87a6cbbe8c556399f415772c2dd2d48981.tar.gz rails-92c60f87a6cbbe8c556399f415772c2dd2d48981.tar.bz2 rails-92c60f87a6cbbe8c556399f415772c2dd2d48981.zip |
revises a regexp
The exclamation mark is not a metacharacter.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 5e9bdc7b00..34131a704a 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -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 |