lib/active_support/inflector/methods.rb in activesupport-3.0.0.beta vs lib/active_support/inflector/methods.rb in activesupport-3.0.0.beta2

- old
+ new

@@ -107,10 +107,10 @@ names = camel_cased_word.split('::') names.shift if names.empty? || names.first.empty? constant = Object names.each do |name| - constant = constant.const_get(name, false) || constant.const_missing(name) + constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) end constant end end \ No newline at end of file