From d0706c3626fcab9cd87a522071a3f6027a6fb79d Mon Sep 17 00:00:00 2001 From: Semyon Perepelitsa Date: Tue, 31 Jan 2012 18:09:11 +0800 Subject: There is an "inherit" option on const_get too, why not use it? --- activesupport/lib/active_support/inflector/methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/inflector/methods.rb') diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 4e6eb27756..12dc86aeac 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -212,7 +212,7 @@ module ActiveSupport constant = Object names.each do |name| - constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) + constant = constant.const_get(name, false) end constant end -- cgit v1.2.3