# File lib/active_support/inflector.rb, line 156 def constantize(camel_cased_word) raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!" unless /^(::)?([A-Z]\w*)(::[A-Z]\w*)*$/ =~ camel_cased_word camel_cased_word = "::#{camel_cased_word}" unless $1 Object.module_eval(camel_cased_word, __FILE__, __LINE__) end