提交 92c60f87 编写于 作者: X Xavier Noria

revises a regexp

The exclamation mark is not a metacharacter.
上级 cfc91c31
......@@ -314,7 +314,7 @@ def safe_constantize(camel_cased_word)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册