aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-07-22 23:17:39 +0200
committerXavier Noria <fxn@hashref.com>2016-07-22 23:20:25 +0200
commit92c60f87a6cbbe8c556399f415772c2dd2d48981 (patch)
treea2db22d5bc14f250e088079fa36210b52470dbbf /activesupport
parentcfc91c31aa989826e992be29b6d5b181f654f853 (diff)
downloadrails-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.rb2
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