From 92c60f87a6cbbe8c556399f415772c2dd2d48981 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 22 Jul 2016 23:17:39 +0200 Subject: [PATCH] revises a regexp The exclamation mark is not a metacharacter. --- activesupport/lib/active_support/inflector/methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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